Class: TZInfo::InfoTimezone Abstract
- Defined in:
- lib/tzinfo/info_timezone.rb
Overview
A Timezone based on a DataSources::TimezoneInfo.
Direct Known Subclasses
Instance Method Summary collapse
-
#identifier ⇒ String
The identifier of the time zone, for example,
"Europe/Paris"
. -
#info ⇒ DataSources::TimezoneInfo
protected
The DataSources::TimezoneInfo this InfoTimezone is based on.
-
#initialize(info) ⇒ InfoTimezone
constructor
Initializes a new InfoTimezone.
Methods inherited from Timezone
#<=>, #=~, #_dump, _load, #abbreviation, all, all_country_zone_identifiers, all_country_zones, all_data_zone_identifiers, all_data_zones, all_identifiers, all_linked_zone_identifiers, all_linked_zones, #base_utc_offset, #canonical_identifier, #canonical_zone, #current_period, #current_time_and_period, default_dst, default_dst=, #dst?, #eql?, #friendly_identifier, get, get_proxy, #hash, #inspect, #local_datetime, #local_time, #local_timestamp, #local_to_utc, #name, #now, #observed_utc_offset, #offsets_up_to, #period_for, #period_for_local, #period_for_utc, #periods_for_local, #strftime, #to_local, #to_s, #transitions_up_to, #utc_to_local
Constructor Details
#initialize(info) ⇒ InfoTimezone
Initializes a new TZInfo::InfoTimezone.
TZInfo::InfoTimezone instances should not normally be created directly. Use the Timezone.get method to obtain Timezone instances.
17 18 19 20 |
# File 'lib/tzinfo/info_timezone.rb', line 17 def initialize(info) super() @info = info end |
Instance Method Details
#identifier ⇒ String
Returns the identifier of the time zone, for example,
"Europe/Paris"
.
23 24 25 |
# File 'lib/tzinfo/info_timezone.rb', line 23 def identifier @info.identifier end |
#info ⇒ DataSources::TimezoneInfo (protected)
Returns the DataSources::TimezoneInfo this TZInfo::InfoTimezone is based on.
31 32 33 |
# File 'lib/tzinfo/info_timezone.rb', line 31 def info @info end |