Class: Montrose::Rule::Before

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Montrose::Rule

#advance!, included

Constructor Details

#initialize(end_time) ⇒ Before

Returns a new instance of Before


11
12
13
# File 'lib/montrose/rule/before.rb', line 11

def initialize(end_time)
  @end_time = end_time
end

Class Method Details

.apply_options(opts) ⇒ Object


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

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

Instance Method Details

#continue?Boolean

Returns:

  • (Boolean)

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

def continue?
  false
end

#include?(time) ⇒ Boolean

Returns:

  • (Boolean)

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

def include?(time)
  time < @end_time
end