Class: Montrose::Rule::Covering
- Inherits:
-
Object
- Object
- Montrose::Rule::Covering
- Includes:
- Montrose::Rule
- Defined in:
- lib/montrose/rule/covering.rb
Defined Under Namespace
Classes: DateRange
Class Method Summary collapse
Instance Method Summary collapse
- #continue?(time) ⇒ Boolean
- #include?(time) ⇒ Boolean
-
#initialize(covering) ⇒ Covering
constructor
Initializes rule.
Methods included from Montrose::Rule
Constructor Details
Class Method Details
.apply_options(opts) ⇒ Object
8 9 10 |
# File 'lib/montrose/rule/covering.rb', line 8 def self.(opts) opts[:covering].is_a?(Range) && opts[:covering] end |
Instance Method Details
#continue?(time) ⇒ Boolean
29 30 31 |
# File 'lib/montrose/rule/covering.rb', line 29 def continue?(time) time < @covering.last end |
#include?(time) ⇒ Boolean
25 26 27 |
# File 'lib/montrose/rule/covering.rb', line 25 def include?(time) @covering.include?(time) end |