Class: TZInfo::LinkedTimezoneInfo
- Inherits:
-
TimezoneInfo
- Object
- TimezoneInfo
- TZInfo::LinkedTimezoneInfo
- Defined in:
- lib/tzinfo/linked_timezone_info.rb
Overview
Represents a timezone that is defined as a link or alias to another zone.
Instance Attribute Summary collapse
-
#link_to_identifier ⇒ Object
readonly
The zone that provides the data (that this zone is an alias for).
Attributes inherited from TimezoneInfo
Instance Method Summary collapse
-
#create_timezone ⇒ Object
Constructs a Timezone instance for the timezone represented by this DataTimezoneInfo.
-
#initialize(identifier, link_to_identifier) ⇒ LinkedTimezoneInfo
constructor
Constructs a new LinkedTimezoneInfo with an identifier and the identifier of the zone linked to.
-
#inspect ⇒ Object
Returns internal object state as a programmer-readable string.
Constructor Details
#initialize(identifier, link_to_identifier) ⇒ LinkedTimezoneInfo
Constructs a new LinkedTimezoneInfo with an identifier and the identifier of the zone linked to.
10 11 12 13 |
# File 'lib/tzinfo/linked_timezone_info.rb', line 10 def initialize(identifier, link_to_identifier) super(identifier) @link_to_identifier = link_to_identifier end |
Instance Attribute Details
#link_to_identifier ⇒ Object (readonly)
The zone that provides the data (that this zone is an alias for).
6 7 8 |
# File 'lib/tzinfo/linked_timezone_info.rb', line 6 def link_to_identifier @link_to_identifier end |
Instance Method Details
#create_timezone ⇒ Object
Constructs a Timezone instance for the timezone represented by this DataTimezoneInfo.
22 23 24 |
# File 'lib/tzinfo/linked_timezone_info.rb', line 22 def create_timezone LinkedTimezone.new(self) end |
#inspect ⇒ Object
Returns internal object state as a programmer-readable string.
16 17 18 |
# File 'lib/tzinfo/linked_timezone_info.rb', line 16 def inspect "#<#{self.class}: #@identifier,#@link_to_identifier>" end |