Class: TwitterCldr::Resources::TerritoriesImporter::TerritoryData

Inherits:
Object
  • Object
show all
Defined in:
lib/twitter_cldr/resources/territories_importer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(locale, cldr_req) ⇒ TerritoryData

Returns a new instance of TerritoryData.



53
54
55
56
# File 'lib/twitter_cldr/resources/territories_importer.rb', line 53

def initialize(locale, cldr_req)
  @locale = locale
  @cldr_req = cldr_req
end

Instance Attribute Details

#cldr_reqObject (readonly)

Returns the value of attribute cldr_req.



51
52
53
# File 'lib/twitter_cldr/resources/territories_importer.rb', line 51

def cldr_req
  @cldr_req
end

#localeObject (readonly)

Returns the value of attribute locale.



51
52
53
# File 'lib/twitter_cldr/resources/territories_importer.rb', line 51

def locale
  @locale
end

Instance Method Details

#to_hObject



58
59
60
# File 'lib/twitter_cldr/resources/territories_importer.rb', line 58

def to_h
  { territories: Territories.deep_normalize_territory_code_keys(territories) }
end