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