Sha256: 5acab1e99c87b4a6661af14ec6e01c7267d2cd2e0de6b77d656041c5ba91ff4b
Contents?: true
Size: 318 Bytes
Versions: 65
Compression:
Stored size: 318 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 module TwitterCldr module Formatters class TimespanFormatter < Formatter def format(tokens, number, options = {}) tokens.map(&:value).join.gsub(/\{[0-9]\}/, number.abs.to_s) end end end end
Version data entries
65 entries across 65 versions & 3 rubygems