Class: TwitterCldr::Formatters::TimespanFormatter
- Defined in:
- lib/twitter_cldr/formatters/calendars/timespan_formatter.rb
Instance Attribute Summary
Attributes inherited from Formatter
Instance Method Summary collapse
Methods inherited from Formatter
Constructor Details
This class inherits a constructor from TwitterCldr::Formatters::Formatter
Instance Method Details
#format(tokens, number, options = {}) ⇒ Object
10 11 12 |
# File 'lib/twitter_cldr/formatters/calendars/timespan_formatter.rb', line 10 def format(tokens, number, = {}) tokens.map(&:value).join.gsub(/\{[0-9]\}/, number.abs.to_s) end |