123456789_123456789_123456789_123456789_123456789_

Module: TZInfo::Format2::TimezoneIndexDefinition::ClassMethods Private

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

Overview

Class methods for inclusion.

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#data_timezonesArray<String> (readonly)

Returns:

  • (Array<String>)

    a frozen Array containing the identifiers of all data time zones. Identifiers are sorted according to String#<=>.

[ GitHub ]

  
# File 'lib/tzinfo/format2/timezone_index_definition.rb', line 33

attr_reader :data_timezones

#linked_timezonesArray<String> (readonly)

Returns:

  • (Array<String>)

    a frozen Array containing the identifiers of all linked time zones. Identifiers are sorted according to String#<=>.

[ GitHub ]

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

attr_reader :linked_timezones

Instance Method Details

#timezone_index {|definer| ... }

Defines the index.

Yields:

  • (definer)

    yields to the caller to allow the index to be defined.

Yield Parameters:

[ GitHub ]

  
# File 'lib/tzinfo/format2/timezone_index_definition.rb', line 46

def timezone_index
  definer = TimezoneIndexDefiner.new(StringDeduper.global)
  yield definer
  @data_timezones = definer.data_timezones.sort!.freeze
  @linked_timezones = definer.linked_timezones.sort!.freeze
end