123456789_123456789_123456789_123456789_123456789_

Module: TZInfo::Format2::CountryIndexDefinition::ClassMethods Private

Do not use. This module is for internal use only.
Relationships & Source Files
Defined in: lib/tzinfo/format2/country_index_definition.rb

Overview

Class methods for inclusion.

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#countriesHash<String, DataSources::CountryInfo> (readonly)

Returns:

  • (Hash<String, DataSources::CountryInfo>)

    a frozen Hash of all the countries that have been defined in the index keyed by their codes.

[ GitHub ]

  
# File 'lib/tzinfo/format2/country_index_definition.rb', line 29

attr_reader :countries

Instance Method Details

#country_index {|definer| ... } (private)

Defines the index.

Yields:

  • (definer)

    yields to allow the index to be defined.

Yield Parameters:

[ GitHub ]

  
# File 'lib/tzinfo/format2/country_index_definition.rb', line 38

def country_index
  definer = CountryIndexDefiner.new(StringDeduper.global, StringDeduper.new)
  yield definer
  @countries = definer.countries.freeze
end