Class: Timezone::Parser::Zone::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/timezone/parser/zone/entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, offset, rule, format, end_date) ⇒ Entry

Returns a new instance of Entry.



12
13
14
15
16
17
18
# File 'lib/timezone/parser/zone/entry.rb', line 12

def initialize(name, offset, rule, format, end_date)
  @name, @format = name, format

  @end_date = parse_end_date(end_date)
  @offset   = parse_offset(offset)
  @rules    = parse_rules(rule, @end_date)
end

Instance Attribute Details

#end_dateObject (readonly)

Returns the value of attribute end_date.



10
11
12
# File 'lib/timezone/parser/zone/entry.rb', line 10

def end_date
  @end_date
end

#formatObject (readonly)

Returns the value of attribute format.



10
11
12
# File 'lib/timezone/parser/zone/entry.rb', line 10

def format
  @format
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/timezone/parser/zone/entry.rb', line 10

def name
  @name
end

#offsetObject (readonly)

Returns the value of attribute offset.



10
11
12
# File 'lib/timezone/parser/zone/entry.rb', line 10

def offset
  @offset
end

#rulesObject (readonly)

Returns the value of attribute rules.



10
11
12
# File 'lib/timezone/parser/zone/entry.rb', line 10

def rules
  @rules
end