Class: Cldr::Export::Data::Base

Inherits:
Hash
  • Object
show all
Defined in:
lib/cldr/export/data/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Hash

#deep_merge, #deep_stringify_keys, #symbolize_keys

Constructor Details

#initialize(locale) ⇒ Base

Returns a new instance of Base.



11
12
13
# File 'lib/cldr/export/data/base.rb', line 11

def initialize(locale)
  @locale = locale
end

Instance Attribute Details

#localeObject (readonly)

Returns the value of attribute locale.



9
10
11
# File 'lib/cldr/export/data/base.rb', line 9

def locale
  @locale
end

Instance Method Details

#[]=(key, value) ⇒ Object



19
20
21
# File 'lib/cldr/export/data/base.rb', line 19

def []=(key, value)
  store(key, value) unless value.nil? || value.respond_to?(:empty?) && value.empty?
end

#update(hash) ⇒ Object



15
16
17
# File 'lib/cldr/export/data/base.rb', line 15

def update(hash)
  hash.each { |key, value| self[key] = value }
end