Module: TimeCrisis::TZInfo::TimezoneIndexDefinition::ClassMethods
- Defined in:
- lib/time_crisis/tzinfo/timezone_index_definition.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#data_timezones ⇒ Object
Returns a frozen array containing the identifiers of all data timezones.
-
#linked_timezone(identifier) ⇒ Object
Defines a timezone which is a link to another timezone.
-
#linked_timezones ⇒ Object
Returns a frozen array containing the identifiers of all linked timezones.
-
#timezone(identifier) ⇒ Object
Defines a timezone based on data.
-
#timezones ⇒ Object
Returns a frozen array containing the identifiers of all the timezones.
Instance Method Details
#data_timezones ⇒ Object
Returns a frozen array containing the identifiers of all data timezones. Identifiers appear in the order they were defined in the index.
37 38 39 |
# File 'lib/time_crisis/tzinfo/timezone_index_definition.rb', line 37 def data_timezones @data_timezones.freeze end |
#linked_timezone(identifier) ⇒ Object
Defines a timezone which is a link to another timezone.
24 25 26 27 |
# File 'lib/time_crisis/tzinfo/timezone_index_definition.rb', line 24 def linked_timezone(identifier) @timezones << identifier @linked_timezones << identifier end |
#linked_timezones ⇒ Object
Returns a frozen array containing the identifiers of all linked timezones. Identifiers appear in the order they were defined in the index.
44 45 46 |
# File 'lib/time_crisis/tzinfo/timezone_index_definition.rb', line 44 def linked_timezones @linked_timezones.freeze end |
#timezone(identifier) ⇒ Object
Defines a timezone based on data.
18 19 20 21 |
# File 'lib/time_crisis/tzinfo/timezone_index_definition.rb', line 18 def timezone(identifier) @timezones << identifier @data_timezones << identifier end |
#timezones ⇒ Object
Returns a frozen array containing the identifiers of all the timezones. Identifiers appear in the order they were defined in the index.
31 32 33 |
# File 'lib/time_crisis/tzinfo/timezone_index_definition.rb', line 31 def timezones @timezones.freeze end |