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

Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_index_definition.rb

Overview

Class methods for inclusion.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#data_timezonesArray<String> (readonly)

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

Returns:

  • (Array<String>)

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



33
34
35
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_index_definition.rb', line 33

def data_timezones
  @data_timezones
end

#linked_timezonesArray<String> (readonly)

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

Returns:

  • (Array<String>)

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



38
39
40
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_index_definition.rb', line 38

def linked_timezones
  @linked_timezones
end

Instance Method Details

#timezone_index {|definer| ... } ⇒ Object

Defines the index.

Yields:

  • (definer)

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

Yield Parameters:



46
47
48
49
50
51
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/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