Class: TZInfo::TZDataActivatedRule
- Inherits:
-
Object
- Object
- TZInfo::TZDataActivatedRule
- Defined in:
- lib/tzinfo/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.
923 924 925 926 927 |
# File 'lib/tzinfo/tzdataparser.rb', line 923 def initialize(rule, year) @rule = rule @year = year @at = nil end |
Instance Attribute Details
#at ⇒ Object (readonly)
Returns the value of attribute at.
921 922 923 |
# File 'lib/tzinfo/tzdataparser.rb', line 921 def at @at end |
#rule ⇒ Object (readonly)
:nodoc:
919 920 921 |
# File 'lib/tzinfo/tzdataparser.rb', line 919 def rule @rule end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
920 921 922 |
# File 'lib/tzinfo/tzdataparser.rb', line 920 def year @year end |
Instance Method Details
#calculate_time(utc_offset, std_offset) ⇒ Object
929 930 931 |
# File 'lib/tzinfo/tzdataparser.rb', line 929 def calculate_time(utc_offset, std_offset) @at = @rule.at_utc_time(@year, utc_offset, std_offset) end |