123456789_123456789_123456789_123456789_123456789_

Module: TZInfo::Format1::TimezoneIndexDefinition::ClassMethods Private

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

Overview

Class methods for inclusion.

Instance Method Summary

Instance Method Details

#data_timezonesArray<String>

Returns:

  • (Array<String>)

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

[ GitHub ]

  
# File 'lib/tzinfo/format1/timezone_index_definition.rb', line 32

def data_timezones
  unless @data_timezones.frozen?
    @data_timezones = @data_timezones.sort.freeze
  end
  @data_timezones
end

#linked_timezone(identifier) (private)

Adds a linked time zone to the index.

Parameters:

  • identifier (String)

    the time zone identifier.

[ GitHub ]

  
# File 'lib/tzinfo/format1/timezone_index_definition.rb', line 63

def linked_timezone(identifier)
  identifier = StringDeduper.global.dedupe(identifier)
  @timezones << identifier
  @linked_timezones << identifier
end

#linked_timezonesArray<String>

Returns:

  • (Array<String>)

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

[ GitHub ]

  
# File 'lib/tzinfo/format1/timezone_index_definition.rb', line 42

def linked_timezones
  unless @linked_timezones.frozen?
    @linked_timezones = @linked_timezones.sort.freeze
  end
  @linked_timezones
end

#timezone(identifier) (private)

Adds a data time zone to the index.

Parameters:

  • identifier (String)

    the time zone identifier.

[ GitHub ]

  
# File 'lib/tzinfo/format1/timezone_index_definition.rb', line 54

def timezone(identifier)
  identifier = StringDeduper.global.dedupe(identifier)
  @timezones << identifier
  @data_timezones << identifier
end