Class: Timezone::Parser::Line
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/timezone/parser.rb |
Overview
Represents a single timezone data file line.
Constant Summary
-
SOURCE_FORMAT =
# File 'lib/timezone/parser.rb', line 80'%a %b %e %H:%M:%S %Y %Z'
Class Method Summary
- .new(match) ⇒ Line constructor
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(match) ⇒ Line
# File 'lib/timezone/parser.rb', line 82
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