Class: Rundown::Processors::Dates

Inherits:
Rundown::Processor show all
Defined in:
lib/rundown/processors/dates.rb

Constant Summary

Constants inherited from Rundown::Processor

Rundown::Processor::PUNCTUATION

Instance Attribute Summary collapse

Attributes inherited from Rundown::Processor

#words

Instance Method Summary collapse

Methods inherited from Rundown::Processor

#sentences

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

#parserObject

Returns the value of attribute parser.



4
5
6
# File 'lib/rundown/processors/dates.rb', line 4

def parser
  @parser
end

#textObject

Returns the value of attribute text.



4
5
6
# File 'lib/rundown/processors/dates.rb', line 4

def text
  @text
end

Instance Method Details

#processObject



11
12
13
# File 'lib/rundown/processors/dates.rb', line 11

def process
  parser.parse(text).occurrences
end