Module: TZInfo::TimezoneIndexDefinition::ClassMethods

Defined in:
lib/tzinfo/timezone_index_definition.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#data_timezonesObject

Returns a frozen array containing the identifiers of all data timezones. Identifiers appear in the order they were defined in the index.



58
59
60
# File 'lib/tzinfo/timezone_index_definition.rb', line 58

def data_timezones
  @data_timezones.freeze
end

#linked_timezone(identifier) ⇒ Object

Defines a timezone which is a link to another timezone.



45
46
47
48
# File 'lib/tzinfo/timezone_index_definition.rb', line 45

def linked_timezone(identifier)
  @timezones << identifier
  @linked_timezones << identifier
end

#linked_timezonesObject

Returns a frozen array containing the identifiers of all linked timezones. Identifiers appear in the order they were defined in the index.



65
66
67
# File 'lib/tzinfo/timezone_index_definition.rb', line 65

def linked_timezones
  @linked_timezones.freeze
end

#timezone(identifier) ⇒ Object

Defines a timezone based on data.



39
40
41
42
# File 'lib/tzinfo/timezone_index_definition.rb', line 39

def timezone(identifier)
  @timezones << identifier
  @data_timezones << identifier
end

#timezonesObject

Returns a frozen array containing the identifiers of all the timezones. Identifiers appear in the order they were defined in the index.



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

def timezones
  @timezones.freeze
end