Class: TwitterCldr::Tokenizers::TimespanTokenizer

Inherits:
Object
  • Object
show all
Defined in:
lib/twitter_cldr/tokenizers/calendars/timespan_tokenizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_reader) ⇒ TimespanTokenizer

Returns a new instance of TimespanTokenizer.



12
13
14
# File 'lib/twitter_cldr/tokenizers/calendars/timespan_tokenizer.rb', line 12

def initialize(data_reader)
  @data_reader = data_reader
end

Instance Attribute Details

#data_readerObject (readonly)

Returns the value of attribute data_reader.



10
11
12
# File 'lib/twitter_cldr/tokenizers/calendars/timespan_tokenizer.rb', line 10

def data_reader
  @data_reader
end

Instance Method Details

#tokenize(pattern) ⇒ Object



16
17
18
# File 'lib/twitter_cldr/tokenizers/calendars/timespan_tokenizer.rb', line 16

def tokenize(pattern)
  PatternTokenizer.new(data_reader, tokenizer).tokenize(pattern)
end