class Timezone::Parser::Line
Represents a single timezone data file line.
Constants
- SOURCE_FORMAT
Attributes
dst[RW]
name[RW]
offset[RW]
source[RW]
Public Class Methods
new(match)
click to toggle source
# File lib/timezone/parser.rb, line 81 def initialize(match) self.source = Time.strptime(match[1] + 'C', SOURCE_FORMAT).to_i self.name = match[2].split(' ').last self.dst = match[3].to_i self.offset = match[4].to_i end
Public Instance Methods
==(other)
click to toggle source
# File lib/timezone/parser.rb, line 88 def ==(other) name == other.name && dst == other.dst && offset == other.offset end
to_s()
click to toggle source
# File lib/timezone/parser.rb, line 92 def to_s [source, name, dst, offset].join(':') end