class Montrose::Rule::Between
Public Class Methods
apply_options(opts)
click to toggle source
# File lib/montrose/rule/between.rb, line 8 def self.apply_options(opts) opts[:between].is_a?(Range) && opts[:between] end
new(between)
click to toggle source
Initializes rule
@param [Range] between - timestamp range
# File lib/montrose/rule/between.rb, line 16 def initialize(between) @between = between end
Public Instance Methods
continue?(time)
click to toggle source
# File lib/montrose/rule/between.rb, line 24 def continue?(time) time < @between.max end
include?(time)
click to toggle source
# File lib/montrose/rule/between.rb, line 20 def include?(time) @between.cover?(time) end