Class: TZInfo::Data::TZDataActivatedRule
- Inherits:
-
Object
- Object
- TZInfo::Data::TZDataActivatedRule
- Defined in:
- lib/tzinfo/data/tzdataparser.rb
Overview
An instance of a rule for a year.
Instance Attribute Summary collapse
-
#at ⇒ Object
readonly
Returns the value of attribute at.
-
#rule ⇒ Object
readonly
:nodoc:.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
- #calculate_time(utc_offset, std_offset) ⇒ Object
-
#initialize(rule, year) ⇒ TZDataActivatedRule
constructor
A new instance of TZDataActivatedRule.
Constructor Details
#initialize(rule, year) ⇒ TZDataActivatedRule
Returns a new instance of TZDataActivatedRule.
1013 1014 1015 1016 1017 |
# File 'lib/tzinfo/data/tzdataparser.rb', line 1013 def initialize(rule, year) @rule = rule @year = year @at = nil end |
Instance Attribute Details
#at ⇒ Object (readonly)
Returns the value of attribute at.
1011 1012 1013 |
# File 'lib/tzinfo/data/tzdataparser.rb', line 1011 def at @at end |
#rule ⇒ Object (readonly)
:nodoc:
1009 1010 1011 |
# File 'lib/tzinfo/data/tzdataparser.rb', line 1009 def rule @rule end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
1010 1011 1012 |
# File 'lib/tzinfo/data/tzdataparser.rb', line 1010 def year @year end |
Instance Method Details
#calculate_time(utc_offset, std_offset) ⇒ Object
1019 1020 1021 |
# File 'lib/tzinfo/data/tzdataparser.rb', line 1019 def calculate_time(utc_offset, std_offset) @at = @rule.at_utc_time(@year, utc_offset, std_offset) end |