Class: TZInfo::DayOfYearTransitionRule Abstract Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
TZInfo::AbsoluteDayOfYearTransitionRule, TZInfo::JulianDayOfYearTransitionRule
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
TransitionRule
|
|
Instance Chain:
self,
TransitionRule
|
|
Inherits: |
TZInfo::TransitionRule
|
Defined in: | lib/tzinfo/transition_rule.rb |
Overview
This class is abstract.
A base class for transition rules that activate based on an integer day of the year.
Class Method Summary
-
.new(day, transition_at) ⇒ DayOfYearTransitionRule
constructor
Internal use only
Initializes a new
DayOfYearTransitionRule
.
TransitionRule
- Inherited
.new | Initializes a new |
Instance Attribute Summary
- #seconds ⇒ Integer readonly protected Internal use only
TransitionRule
- Inherited
#transition_at | Returns the number of seconds after midnight local time on the day identified by the rule at which the transition occurs. |
Instance Method Summary
-
#==(r) ⇒ Boolean
(also: #eql?)
Internal use only
Determines if this
DayOfYearTransitionRule
is equal to another instance. -
#eql?(r)
Alias for #==.
- #hash_args ⇒ Array protected Internal use only
TransitionRule
- Inherited
#== | Determines if this |
#at | Calculates the time of the transition from a given offset on a given year. |
#eql? | Alias for TransitionRule#==. |
#hash, #hash_args |
Instance Attribute Details
#seconds ⇒ Integer
(readonly, protected)
# File 'lib/tzinfo/transition_rule.rb', line 102
attr_reader :seconds
Instance Method Details
#==(r) ⇒ Boolean
Also known as: #eql?
Determines if this DayOfYearTransitionRule
is equal to another instance.
# File 'lib/tzinfo/transition_rule.rb', line 94
def ==(r) super(r) && r.kind_of?(DayOfYearTransitionRule) && @seconds == r.seconds end
#eql?(r)
Alias for #==.
# File 'lib/tzinfo/transition_rule.rb', line 97
alias eql? ==
#hash_args ⇒ Array
(protected)
# File 'lib/tzinfo/transition_rule.rb', line 105
def hash_args [@seconds] + super end