Class: AgentC::Processor::Handler

Inherits:
Data
  • Object
show all
Defined in:
lib/agent_c/processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#handlerObject (readonly)

Returns the value of attribute handler

Returns:

  • (Object)

    the current value of handler



5
6
7
# File 'lib/agent_c/processor.rb', line 5

def handler
  @handler
end

#taskObject (readonly)

Returns the value of attribute task

Returns:

  • (Object)

    the current value of task



5
6
7
# File 'lib/agent_c/processor.rb', line 5

def task
  @task
end

Instance Method Details

#callObject



6
7
8
9
10
11
# File 'lib/agent_c/processor.rb', line 6

def call
  handler.call(task)
  if task.pending?
    raise "Task Pending error"
  end
end