class TZFormater::Common::Timezone
Attributes
name[R]
Public Class Methods
all()
click to toggle source
# File lib/tzformater/common/timezone.rb, line 15 def self.all @@storage.get_all(@key).map{|key, value| self.new(key, value) } end
new(tz, info = nil)
click to toggle source
# File lib/tzformater/common/timezone.rb, line 19 def initialize(tz, info = nil) @name = tz @info = info || @@storage.get_by(@key, @name) raise ArgumentError.new("Unknown #{@key} timezone") if @info.nil? end
Public Instance Methods
offset()
click to toggle source
# File lib/tzformater/common/timezone.rb, line 32 def offset @info[:offset] end
Private Instance Methods
process_tzs(tz_list) { |tz| ... }
click to toggle source
# File lib/tzformater/common/timezone.rb, line 37 def process_tzs(tz_list) if tz_list.kind_of? Array tz_list.map{|tz| yield(tz) } else yield(tz_list) end end