Class: TwitterCldr::Formatters::PercentFormatter

Inherits:
NumberFormatter show all
Defined in:
lib/twitter_cldr/formatters/numbers/percent_formatter.rb

Constant Summary collapse

DEFAULT_PERCENT_SIGN =
"%"

Instance Attribute Summary

Attributes inherited from NumberFormatter

#data_reader

Attributes inherited from Formatter

#data_reader

Instance Method Summary collapse

Methods inherited from NumberFormatter

#initialize, #truncate_number

Methods inherited from Formatter

#initialize

Constructor Details

This class inherits a constructor from TwitterCldr::Formatters::NumberFormatter

Instance Method Details

#format(tokens, number, options = {}) ⇒ Object



12
13
14
# File 'lib/twitter_cldr/formatters/numbers/percent_formatter.rb', line 12

def format(tokens, number, options = {})
  super(tokens, number, options).gsub('ยค', data_reader.symbols[:percent_sign] || DEFAULT_PERCENT_SIGN)
end