Class: Montrose::Rule::After

Inherits:
Object
  • Object
show all
Includes:
Montrose::Rule
Defined in:
lib/montrose/rule/after.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Montrose::Rule

#advance!, included

Constructor Details

#initialize(start_time) ⇒ After

Initializes rule

Parameters:

  • start_time (Time)
    • lower bound timestamp



16
17
18
# File 'lib/montrose/rule/after.rb', line 16

def initialize(start_time)
  @start_time = start_time
end

Class Method Details

.apply_options(opts) ⇒ Object



8
9
10
# File 'lib/montrose/rule/after.rb', line 8

def self.apply_options(opts)
  opts.start_time
end

Instance Method Details

#continue?(_time) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/montrose/rule/after.rb', line 24

def continue?(_time)
  false
end

#include?(time) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/montrose/rule/after.rb', line 20

def include?(time)
  time >= @start_time
end