Class: TwitterCldr::Formatters::Numbers::Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/plurimath/formatter/twitter_cldr_rb/integer.rb

Instance Method Summary collapse

Constructor Details

#initialize(token, symbols = {}) ⇒ Integer

Returns a new instance of Integer.



7
8
9
10
11
12
# File 'lib/plurimath/formatter/twitter_cldr_rb/integer.rb', line 7

def initialize(token, symbols = {})
  format     = token.value.split('.')[0]
  @format    = prepare_format(format, symbols)
  @groups    = Array(symbols[:group_digits] || parse_groups(format))
  @separator = symbols[:group] || ','
end