Sha256: 8c59b68f0f946ed8247d6dec296b3d460fa0b94965e0a4564bbad8fcbd25fbe2

Contents?: true

Size: 518 Bytes

Versions: 4

Compression:

Stored size: 518 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

module TwitterCldr
  class LocalizedTimespan < LocalizedObject

    def initialize(seconds, options = {})
      super(seconds, options[:locale], options)
      @formatter = TwitterCldr::Formatters::TimespanFormatter.new(options)
    end

    def to_s(options = {})
      @formatter.format(@base_obj, options)
    end

    protected

    def formatter_const
      TwitterCldr::Formatters::TimespanFormatter
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twitter_cldr-1.7.0 lib/twitter_cldr/core_ext/calendars/timespan.rb
twitter_cldr-1.6.2 lib/twitter_cldr/core_ext/calendars/timespan.rb
twitter_cldr-1.6.1 lib/twitter_cldr/core_ext/calendars/timespan.rb
twitter_cldr-1.6.0 lib/twitter_cldr/core_ext/calendars/timespan.rb