Class: TwitterCldr::Tokenizers::Base

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.


13
14
15
16
17
# File 'lib/twitter_cldr/tokenizers/base.rb', line 13

def initialize(options = {})
  @locale = (options[:locale] || TwitterCldr::DEFAULT_LOCALE).to_sym
  self.init_resources
  self.init_placeholders
end

Instance Attribute Details

#localeObject (readonly)

Returns the value of attribute locale


9
10
11
# File 'lib/twitter_cldr/tokenizers/base.rb', line 9

def locale
  @locale
end

#pathsObject (readonly)

Returns the value of attribute paths


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

def paths
  @paths
end

#placeholdersObject

Returns the value of attribute placeholders


11
12
13
# File 'lib/twitter_cldr/tokenizers/base.rb', line 11

def placeholders
  @placeholders
end

#resourceObject (readonly)

Returns the value of attribute resource


9
10
11
# File 'lib/twitter_cldr/tokenizers/base.rb', line 9

def resource
  @resource
end

#token_splitter_regexObject (readonly)

Returns the value of attribute token_splitter_regex


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

def token_splitter_regex
  @token_splitter_regex
end

#token_type_regexesObject (readonly)

Returns the value of attribute token_type_regexes


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

def token_type_regexes
  @token_type_regexes
end

#typeObject

Returns the value of attribute type


11
12
13
# File 'lib/twitter_cldr/tokenizers/base.rb', line 11

def type
  @type
end