Class: TZInfo::DataSources::LinkedTimezoneInfo
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
TimezoneInfo
|
|
Instance Chain:
self,
TimezoneInfo
|
|
Inherits: |
TZInfo::DataSources::TimezoneInfo
|
Defined in: | lib/tzinfo/data_sources/linked_timezone_info.rb |
Overview
Represents a time zone that is defined as a link to or alias of another zone.
Class Method Summary
-
.new(identifier, link_to_identifier) ⇒ LinkedTimezoneInfo
constructor
Initializes a new
LinkedTimezoneInfo
.
TimezoneInfo
- Inherited
.new | Initializes a new |
Instance Attribute Summary
-
#link_to_identifier ⇒ String
readonly
(that this zone links to or is an alias for).
TimezoneInfo
- Inherited
Instance Method Summary
TimezoneInfo
- Inherited
#create_timezone, #inspect, | |
#raise_not_implemented | Raises a |
Constructor Details
.new(identifier, link_to_identifier) ⇒ LinkedTimezoneInfo
Initializes a new LinkedTimezoneInfo
. The passed in identifier
and
#link_to_identifier instances will be frozen.
nil
.
# File 'lib/tzinfo/data_sources/linked_timezone_info.rb', line 20
def initialize(identifier, link_to_identifier) super(identifier) raise ArgumentError, 'link_to_identifier must be specified' unless link_to_identifier @link_to_identifier = link_to_identifier.freeze end
Instance Attribute Details
#link_to_identifier ⇒ String
(readonly)
(that this zone links to or is an alias for).
# File 'lib/tzinfo/data_sources/linked_timezone_info.rb', line 10
attr_reader :link_to_identifier
Instance Method Details
#create_timezone ⇒ LinkedTimezone
# File 'lib/tzinfo/data_sources/linked_timezone_info.rb', line 28
def create_timezone LinkedTimezone.new(self) end