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