From 13c3bdeeb781291fe9dcd0b2714b6add2acb4ea3 Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Thu, 3 Sep 2020 11:26:05 +0200 Subject: [PATCH] Small changes to docs #12 and refactoring --- README.md | 4 ++-- lib/Test/Text.pm | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cba3b98..230b0cb 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Objective --- A module for testing and doing other kind of metrics on regular text, as in books or -novels, or, forthat matter, manuals. +novels, or, for that matter, manuals. We're not there yet, but for the time being it is a pretty good spelling checker that can be used *on the cloud* in continuous @@ -29,7 +29,7 @@ progress by telling you how many words you have written so far and in total, which is an intended side effect of counting the number of tests == number of words. -how can I use it? +how can I use it in a CI pipeline? --- 1. Save the files you want to be tested to a single directory called, diff --git a/lib/Test/Text.pm b/lib/Test/Text.pm index f8c01d6..3301b8f 100644 --- a/lib/Test/Text.pm +++ b/lib/Test/Text.pm @@ -49,18 +49,16 @@ sub new { ); croak "Couldn't create speller: $1" if !$speller; $self->{'_speller'} = $speller; - $speller->add_dic("$dir/words.dic"); #word.dic should be in the text directory + $speller->add_dic("$dir/words.dic"); # word.dic should be in the text directory return $self; } sub dir { - my $self = shift; - return $self->{'_dir'}; + return shift->{'_dir'}; } sub files { - my $self = shift; - return $self->{'_files'}; + return shift->{'_files'}; } sub check {