Class: TZInfo::TimezoneInfo
- Inherits:
-
Object
- Object
- TZInfo::TimezoneInfo
- Defined in:
- lib/tzinfo/timezone_info.rb
Overview
Represents a timezone defined by a data source.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
The timezone identifier.
Instance Method Summary collapse
-
#create_timezone ⇒ Object
Constructs a Timezone instance for the timezone represented by this TimezoneInfo.
-
#initialize(identifier) ⇒ TimezoneInfo
constructor
Constructs a new TimezoneInfo with an identifier.
-
#inspect ⇒ Object
Returns internal object state as a programmer-readable string.
Constructor Details
#initialize(identifier) ⇒ TimezoneInfo
Constructs a new TimezoneInfo with an identifier.
9 10 11 |
# File 'lib/tzinfo/timezone_info.rb', line 9 def initialize(identifier) @identifier = identifier end |
Instance Attribute Details
#identifier ⇒ Object (readonly)
The timezone identifier.
6 7 8 |
# File 'lib/tzinfo/timezone_info.rb', line 6 def identifier @identifier end |
Instance Method Details
#create_timezone ⇒ Object
Constructs a Timezone instance for the timezone represented by this TimezoneInfo.
20 21 22 |
# File 'lib/tzinfo/timezone_info.rb', line 20 def create_timezone raise_not_implemented('create_timezone') end |
#inspect ⇒ Object
Returns internal object state as a programmer-readable string.
14 15 16 |
# File 'lib/tzinfo/timezone_info.rb', line 14 def inspect "#<#{self.class}: #@identifier>" end |