Class: Montrose::Rule::Between
- Inherits:
-
Object
- Object
- Montrose::Rule::Between
- Includes:
- Montrose::Rule
- Defined in:
- lib/montrose/rule/between.rb
Class Method Summary collapse
Instance Method Summary collapse
- #continue?(time) ⇒ Boolean
- #include?(time) ⇒ Boolean
-
#initialize(between) ⇒ Between
constructor
Initializes rule.
Methods included from Montrose::Rule
Constructor Details
#initialize(between) ⇒ Between
Initializes rule
16 17 18 |
# File 'lib/montrose/rule/between.rb', line 16 def initialize(between) @between = between end |
Class Method Details
.apply_options(opts) ⇒ Object
8 9 10 |
# File 'lib/montrose/rule/between.rb', line 8 def self.(opts) opts[:between].is_a?(Range) && opts[:between] end |
Instance Method Details
#continue?(time) ⇒ Boolean
24 25 26 |
# File 'lib/montrose/rule/between.rb', line 24 def continue?(time) time < @between.max end |
#include?(time) ⇒ Boolean
20 21 22 |
# File 'lib/montrose/rule/between.rb', line 20 def include?(time) @between.cover?(time) end |