Class: TZInfo::DataSources::TimezoneInfo Abstract
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/timezone_info.rb
Overview
This class is abstract.
Data sources return instances of TimezoneInfo subclasses.
Represents a time zone defined by a data source.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#identifier ⇒ String
readonly
The identifier of the time zone.
Instance Method Summary collapse
-
#create_timezone ⇒ Timezone
A new Timezone instance for the time zone represented by this TimezoneInfo.
-
#initialize(identifier) ⇒ TimezoneInfo
constructor
Initializes a new TimezoneInfo.
-
#inspect ⇒ String
The internal object state as a programmer-readable ‘String`.
Constructor Details
#initialize(identifier) ⇒ TimezoneInfo
Initializes a new TimezoneInfo. The passed in ‘identifier` instance will be frozen.
18 19 20 21 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/timezone_info.rb', line 18 def initialize(identifier) raise ArgumentError, 'identifier must be specified' unless identifier @identifier = identifier.freeze end |
Instance Attribute Details
#identifier ⇒ String (readonly)
Returns the identifier of the time zone.
11 12 13 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/timezone_info.rb', line 11 def identifier @identifier end |
Instance Method Details
#create_timezone ⇒ Timezone
Returns a new Timezone instance for the time zone represented by this TZInfo::DataSources::TimezoneInfo.
31 32 33 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/timezone_info.rb', line 31 def create_timezone raise_not_implemented('create_timezone') end |
#inspect ⇒ String
Returns the internal object state as a programmer-readable ‘String`.
25 26 27 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/timezone_info.rb', line 25 def inspect "#<#{self.class}: #@identifier>" end |