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


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

def initialize(start_time)
  @start_time = start_time
end

Class Method Details

.apply_options(opts) ⇒ Object


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

def self.apply_options(opts)
  opts[:starts]
end

Instance Method Details

#continue?Boolean

Returns:

  • (Boolean)

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

def continue?
  false
end

#include?(time) ⇒ Boolean

Returns:

  • (Boolean)

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

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