Class: Montrose::Rule::DayOfMonth
- Inherits:
-
Object
- Object
- Montrose::Rule::DayOfMonth
- Includes:
- Montrose::Rule
- Defined in:
- lib/montrose/rule/day_of_month.rb
Class Method Summary collapse
Instance Method Summary collapse
- #include?(time) ⇒ Boolean
-
#initialize(days) ⇒ DayOfMonth
constructor
Initializes rule.
Methods included from Montrose::Rule
#advance!, #continue?, included
Constructor Details
#initialize(days) ⇒ DayOfMonth
Initializes rule
16 17 18 |
# File 'lib/montrose/rule/day_of_month.rb', line 16 def initialize(days) @days = days end |
Class Method Details
.apply_options(opts) ⇒ Object
8 9 10 |
# File 'lib/montrose/rule/day_of_month.rb', line 8 def self.(opts) opts[:mday] end |
Instance Method Details
#include?(time) ⇒ Boolean
20 21 22 |
# File 'lib/montrose/rule/day_of_month.rb', line 20 def include?(time) @days.include?(time.mday) || included_from_end_of_month?(time) end |