Class: TZInfo::DayOfWeekTransitionRule Abstract Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
TZInfo::DayOfMonthTransitionRule, TZInfo::LastDayOfMonthTransitionRule
|
|
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 rules that transition on a particular day of week of a given week (subclasses specify which week of the month).
Class Method Summary
-
.new(month, day_of_week, transition_at) ⇒ DayOfWeekTransitionRule
constructor
Internal use only
Initializes a new
DayOfWeekTransitionRule
.
TransitionRule
- Inherited
.new | Initializes a new |
Instance Attribute Summary
- #is_always_first_day_of_year? ⇒ Boolean readonly Internal use only
- #is_always_last_day_of_year? ⇒ Boolean readonly Internal use only
- #day_of_week ⇒ Integer readonly protected Internal use only
- #month ⇒ 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
DayOfWeekTransitionRule
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
#day_of_week ⇒ Integer
(readonly, protected)
# File 'lib/tzinfo/transition_rule.rb', line 310
attr_reader :day_of_week
#is_always_first_day_of_year? ⇒ Boolean
(readonly)
# File 'lib/tzinfo/transition_rule.rb', line 283
def is_always_first_day_of_year? false end
#is_always_last_day_of_year? ⇒ Boolean
(readonly)
# File 'lib/tzinfo/transition_rule.rb', line 288
def is_always_last_day_of_year? false end
#month ⇒ Integer
(readonly, protected)
# File 'lib/tzinfo/transition_rule.rb', line 307
attr_reader :month
Instance Method Details
#==(r) ⇒ Boolean
Also known as: #eql?
Determines if this DayOfWeekTransitionRule
is equal to another
instance.
# File 'lib/tzinfo/transition_rule.rb', line 299
def ==(r) super(r) && r.kind_of?(DayOfWeekTransitionRule) && @month == r.month && @day_of_week == r.day_of_week end
#eql?(r)
Alias for #==.
# File 'lib/tzinfo/transition_rule.rb', line 302
alias eql? ==
#hash_args ⇒ Array
(protected)
# File 'lib/tzinfo/transition_rule.rb', line 313
def hash_args [@month, @day_of_week] + super end