Module: TimeCrisis::TZInfo::TimezoneDefinition::ClassMethods
- Defined in:
- lib/time_crisis/tzinfo/timezone_definition.rb
Overview
Class methods for inclusion.
Instance Method Summary collapse
-
#get ⇒ Object
Returns the last TimezoneInfo to be defined with timezone or linked_timezone.
-
#linked_timezone(identifier, link_to_identifier) ⇒ Object
Defines a linked timezone.
-
#timezone(identifier) {|@timezone = DataTimezoneInfo.new(identifier)| ... } ⇒ Object
Returns and yields a DataTimezoneInfo object to define a timezone.
Instance Method Details
#get ⇒ Object
Returns the last TimezoneInfo to be defined with timezone or linked_timezone.
30 31 32 |
# File 'lib/time_crisis/tzinfo/timezone_definition.rb', line 30 def get @timezone end |
#linked_timezone(identifier, link_to_identifier) ⇒ Object
Defines a linked timezone.
24 25 26 |
# File 'lib/time_crisis/tzinfo/timezone_definition.rb', line 24 def linked_timezone(identifier, link_to_identifier) @timezone = LinkedTimezoneInfo.new(identifier, link_to_identifier) end |
#timezone(identifier) {|@timezone = DataTimezoneInfo.new(identifier)| ... } ⇒ Object
Returns and yields a DataTimezoneInfo object to define a timezone.
19 20 21 |
# File 'lib/time_crisis/tzinfo/timezone_definition.rb', line 19 def timezone(identifier) yield @timezone = DataTimezoneInfo.new(identifier) end |