Class: RuleQueue::QueueEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/cirrocumulus/rule_queue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(run_data, run_at = nil) ⇒ QueueEntry

Returns a new instance of QueueEntry.



11
12
13
14
15
16
17
# File 'lib/cirrocumulus/rule_queue.rb', line 11

def initialize(run_data, run_at = nil)
  @run_data = run_data
  @rule = run_data.rule
  @params = run_data.parameters
  @run_at = run_at
  @state = :queued
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



7
8
9
# File 'lib/cirrocumulus/rule_queue.rb', line 7

def params
  @params
end

#ruleObject (readonly)

Returns the value of attribute rule.



6
7
8
# File 'lib/cirrocumulus/rule_queue.rb', line 6

def rule
  @rule
end

#run_atObject (readonly)

Returns the value of attribute run_at.



8
9
10
# File 'lib/cirrocumulus/rule_queue.rb', line 8

def run_at
  @run_at
end

#run_dataObject (readonly)

Returns the value of attribute run_data.



5
6
7
# File 'lib/cirrocumulus/rule_queue.rb', line 5

def run_data
  @run_data
end

#stateObject

Returns the value of attribute state.



9
10
11
# File 'lib/cirrocumulus/rule_queue.rb', line 9

def state
  @state
end