Sha256: 3d8d53bce50537689476ed9cdba69a6987b3cd731b9826d93633cd858b2face4

Contents?: true

Size: 491 Bytes

Versions: 5

Compression:

Stored size: 491 Bytes

Contents

# encoding: UTF-8

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

module TwitterCldr
  class LocalizedObject
    attr_reader :locale, :base_obj, :formatter

    def initialize(obj, locale, options = {})
      @base_obj = obj
      @locale = locale

      options = options.dup
      options[:locale] ||= @locale

      @formatter = formatter_const.new(options) if formatter_const
    end

    def formatter_const
      raise NotImplementedError
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
twitter_cldr-1.4.1 lib/twitter_cldr/core_ext/localized_object.rb
twitter_cldr-1.4.0 lib/twitter_cldr/core_ext/localized_object.rb
twitter_cldr-1.3.6 lib/twitter_cldr/core_ext/localized_object.rb
twitter_cldr-1.3.0 lib/twitter_cldr/core_ext/localized_object.rb
twitter_cldr-1.2.0 lib/twitter_cldr/core_ext/localized_object.rb