Class: Rundown::Processors::Sentiment
- Inherits:
-
Rundown::Processor
- Object
- Rundown::Processor
- Rundown::Processors::Sentiment
- Defined in:
- lib/rundown/processors/sentiment.rb
Constant Summary
Constants inherited from Rundown::Processor
Rundown::Processor::PUNCTUATION
Instance Attribute Summary collapse
-
#parser ⇒ Object
Returns the value of attribute parser.
Attributes inherited from Rundown::Processor
Instance Method Summary collapse
-
#initialize(words, parser = SentimentParser) ⇒ Sentiment
constructor
A new instance of Sentiment.
- #process ⇒ Object
Methods inherited from Rundown::Processor
Constructor Details
#initialize(words, parser = SentimentParser) ⇒ Sentiment
Returns a new instance of Sentiment.
6 7 8 9 |
# File 'lib/rundown/processors/sentiment.rb', line 6 def initialize(words, parser=SentimentParser) @parser = parser super(words) end |
Instance Attribute Details
#parser ⇒ Object
Returns the value of attribute parser.
4 5 6 |
# File 'lib/rundown/processors/sentiment.rb', line 4 def parser @parser end |
Instance Method Details
#process ⇒ Object
11 12 13 |
# File 'lib/rundown/processors/sentiment.rb', line 11 def process parser.parse(words.join(' ')) end |