Class: TwitterCldr::Tokenizers::TimespanTokenizer
- Inherits:
-
Object
- Object
- TwitterCldr::Tokenizers::TimespanTokenizer
- Defined in:
- lib/twitter_cldr/tokenizers/calendars/timespan_tokenizer.rb
Instance Attribute Summary collapse
-
#data_reader ⇒ Object
readonly
Returns the value of attribute data_reader.
Instance Method Summary collapse
-
#initialize(data_reader) ⇒ TimespanTokenizer
constructor
A new instance of TimespanTokenizer.
- #tokenize(pattern) ⇒ Object
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_reader ⇒ Object (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 |