Class: SDL4R::AbbreviationTimezoneProxy
- Inherits:
-
TZInfo::Timezone
- Object
- TZInfo::Timezone
- SDL4R::AbbreviationTimezoneProxy
- Defined in:
- lib/sdl4r/abbreviation_timezone_proxy.rb
Class Method Summary collapse
Instance Method Summary collapse
- #_initialize(identifier, consider_modern_abbreviations) ⇒ Object
- #actual_timezone ⇒ Object
- #identifier ⇒ Object
- #period_for_utc(utc) ⇒ Object
- #periods_for_local(local) ⇒ Object
Class Method Details
.new(identifier, consider_modern_abbreviations) ⇒ Object
7 8 9 10 11 |
# File 'lib/sdl4r/abbreviation_timezone_proxy.rb', line 7 def self.new(identifier, consider_modern_abbreviations) o = super() o._initialize(identifier, consider_modern_abbreviations) o end |
Instance Method Details
#_initialize(identifier, consider_modern_abbreviations) ⇒ Object
13 14 15 16 17 |
# File 'lib/sdl4r/abbreviation_timezone_proxy.rb', line 13 def _initialize(identifier, consider_modern_abbreviations) @identifier = identifier @consider_modern_abbreviations = consider_modern_abbreviations @actual_timezone = nil end |
#actual_timezone ⇒ Object
19 20 21 22 23 24 |
# File 'lib/sdl4r/abbreviation_timezone_proxy.rb', line 19 def actual_timezone unless @actual_timezone @actual_timezone = get_timezone(identifier, consider_modern_abbreviations) end @actual_timezone end |
#identifier ⇒ Object
26 27 28 |
# File 'lib/sdl4r/abbreviation_timezone_proxy.rb', line 26 def identifier @identifier end |
#period_for_utc(utc) ⇒ Object
30 31 32 |
# File 'lib/sdl4r/abbreviation_timezone_proxy.rb', line 30 def period_for_utc(utc) actual_timezone.period_for_utc(utc) end |
#periods_for_local(local) ⇒ Object
34 35 36 |
# File 'lib/sdl4r/abbreviation_timezone_proxy.rb', line 34 def periods_for_local(local) actual_timezone.periods_for_local(local) end |