Class: StyleScanner::SentenceScans::Base
- Inherits:
-
Object
- Object
- StyleScanner::SentenceScans::Base
- Defined in:
- lib/style_scanner/sentence_scans/base.rb
Direct Known Subclasses
Adverb, BrokenLink, Capitalization, Cliche, ConsecutivelyRepeatedWord, ExcessWhiteSpace, InappropriateContraction, LatinAbbreviation, PassiveTense, SpeakingInGeneralities, Spelling, UglyWord, UsedWordAlreadyInSentence, UselessWord
Instance Attribute Summary collapse
-
#sentence ⇒ Object
readonly
Returns the value of attribute sentence.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(sentence) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(sentence) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/style_scanner/sentence_scans/base.rb', line 7 def initialize(sentence) @sentence = sentence end |
Instance Attribute Details
#sentence ⇒ Object (readonly)
Returns the value of attribute sentence.
5 6 7 |
# File 'lib/style_scanner/sentence_scans/base.rb', line 5 def sentence @sentence end |
Class Method Details
.load_file(filename) ⇒ Object
61 62 63 64 |
# File 'lib/style_scanner/sentence_scans/base.rb', line 61 def load_file(filename) file_location = File.("../../../dictionaries/#{filename}", __FILE__) IO.read(file_location).split("\n") end |
.scan(sentence) ⇒ Object
11 12 13 |
# File 'lib/style_scanner/sentence_scans/base.rb', line 11 def self.scan(sentence) new(sentence).scan end |