Class: LittleWeasel::Preprocessors::PreprocessedWord
- Inherits:
-
Object
- Object
- LittleWeasel::Preprocessors::PreprocessedWord
- Defined in:
- lib/LittleWeasel/preprocessors/preprocessed_word.rb
Overview
This class represents a word that has passed through Preprocessor::WordPreprocessor processing. Word preprocessors are used to preprocess a word before it is passed to any Filters::WordFilters, and before it is compared against the dictionary for validity. :reek:Attribute, ignored - Fixing this would result in nothing but trivial setter methods
Instance Attribute Summary collapse
-
#original_word ⇒ Object
Returns the value of attribute original_word.
-
#preprocessed ⇒ Object
Returns the value of attribute preprocessed.
-
#preprocessed_word ⇒ Object
Returns the value of attribute preprocessed_word.
-
#preprocessor ⇒ Object
Returns the value of attribute preprocessor.
-
#preprocessor_order ⇒ Object
Returns the value of attribute preprocessor_order.
Instance Method Summary collapse
-
#initialize(original_word:, preprocessed:, preprocessed_word:, preprocessor:, preprocessor_order:) ⇒ PreprocessedWord
constructor
A new instance of PreprocessedWord.
-
#preprocessed? ⇒ Boolean
Returns true if the word was preprocessed; false, if the word was not preprocessed by this preprocessor.
Constructor Details
#initialize(original_word:, preprocessed:, preprocessed_word:, preprocessor:, preprocessor_order:) ⇒ PreprocessedWord
Returns a new instance of PreprocessedWord.
14 15 16 17 18 19 20 |
# File 'lib/LittleWeasel/preprocessors/preprocessed_word.rb', line 14 def initialize(original_word:, preprocessed:, preprocessed_word:, preprocessor:, preprocessor_order:) self.original_word = original_word self.preprocessed_word = preprocessed_word self.preprocessed = preprocessed self.preprocessor = preprocessor self.preprocessor_order = preprocessor_order end |
Instance Attribute Details
#original_word ⇒ Object
Returns the value of attribute original_word.
12 13 14 |
# File 'lib/LittleWeasel/preprocessors/preprocessed_word.rb', line 12 def original_word @original_word end |
#preprocessed ⇒ Object
Returns the value of attribute preprocessed.
12 13 14 |
# File 'lib/LittleWeasel/preprocessors/preprocessed_word.rb', line 12 def preprocessed @preprocessed end |
#preprocessed_word ⇒ Object
Returns the value of attribute preprocessed_word.
12 13 14 |
# File 'lib/LittleWeasel/preprocessors/preprocessed_word.rb', line 12 def preprocessed_word @preprocessed_word end |
#preprocessor ⇒ Object
Returns the value of attribute preprocessor.
12 13 14 |
# File 'lib/LittleWeasel/preprocessors/preprocessed_word.rb', line 12 def preprocessor @preprocessor end |
#preprocessor_order ⇒ Object
Returns the value of attribute preprocessor_order.
12 13 14 |
# File 'lib/LittleWeasel/preprocessors/preprocessed_word.rb', line 12 def preprocessor_order @preprocessor_order end |
Instance Method Details
#preprocessed? ⇒ Boolean
Returns true if the word was preprocessed; false, if the word was not preprocessed by this preprocessor.
24 25 26 |
# File 'lib/LittleWeasel/preprocessors/preprocessed_word.rb', line 24 def preprocessed? preprocessed end |