Class: TimeCrisis::TZInfo::LinkedTimezoneInfo

Inherits:
TimezoneInfo show all
Defined in:
lib/time_crisis/tzinfo/linked_timezone_info.rb

Overview

Represents a linked timezone defined in a data module.

Instance Attribute Summary collapse

Attributes inherited from TimezoneInfo

#identifier

Instance Method Summary collapse

Constructor Details

#initialize(identifier, link_to_identifier) ⇒ LinkedTimezoneInfo

Constructs a new TimezoneInfo with an identifier and the identifier of the zone linked to.



13
14
15
16
# File 'lib/time_crisis/tzinfo/linked_timezone_info.rb', line 13

def initialize(identifier, link_to_identifier)
  super(identifier)
  @link_to_identifier = link_to_identifier
end

Instance Attribute Details

The zone that provides the data (that this zone is an alias for).



9
10
11
# File 'lib/time_crisis/tzinfo/linked_timezone_info.rb', line 9

def link_to_identifier
  @link_to_identifier
end

Instance Method Details

#inspectObject

Returns internal object state as a programmer-readable string.



19
20
21
# File 'lib/time_crisis/tzinfo/linked_timezone_info.rb', line 19

def inspect
  "#<#{self.class}: #@identifier,#@link_to_identifier>"
end