Class: TZInfo::InfoTimezone
- Defined in:
- lib/tzinfo/info_timezone.rb
Overview
A Timezone based on a TimezoneInfo.
Direct Known Subclasses
Class Method Summary collapse
-
.new(info) ⇒ Object
Constructs a new InfoTimezone with a TimezoneInfo instance.
Instance Method Summary collapse
-
#identifier ⇒ Object
The identifier of the timezone, e.g.
Methods inherited from Timezone
#<=>, #_dump, _load, all, all_country_zone_identifiers, all_country_zones, all_data_zone_identifiers, all_data_zones, all_identifiers, all_linked_zone_identifiers, all_linked_zones, #current_period, #current_period_and_time, #eql?, #friendly_identifier, get, get_proxy, #hash, #inspect, #local_to_utc, #name, #now, #period_for_local, #period_for_utc, #periods_for_local, #strftime, #to_s, us_zone_identifiers, us_zones, #utc_to_local
Class Method Details
.new(info) ⇒ Object
Constructs a new InfoTimezone with a TimezoneInfo instance.
31 32 33 34 35 |
# File 'lib/tzinfo/info_timezone.rb', line 31 def self.new(info) tz = super() tz.send(:setup, info) tz end |
Instance Method Details
#identifier ⇒ Object
The identifier of the timezone, e.g. “Europe/Paris”.
38 39 40 |
# File 'lib/tzinfo/info_timezone.rb', line 38 def identifier @info.identifier end |