Class: TimeCrisis::TZInfo::InfoTimezone

Inherits:
Timezone show all
Defined in:
lib/time_crisis/tzinfo/info_timezone.rb

Overview

A Timezone based on a TimezoneInfo.

Direct Known Subclasses

DataTimezone, LinkedTimezone

Class Method Summary collapse

Instance Method Summary collapse

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.



10
11
12
13
14
# File 'lib/time_crisis/tzinfo/info_timezone.rb', line 10

def self.new(info)
  tz = super()
  tz.send(:setup, info)
  tz
end

Instance Method Details

#identifierObject

The identifier of the timezone, e.g. “Europe/Paris”.



17
18
19
# File 'lib/time_crisis/tzinfo/info_timezone.rb', line 17

def identifier
  @info.identifier
end