Class: BatchApi::Processor::Executor

Inherits:
Object
  • Object
show all
Defined in:
lib/batch_api/processor/executor.rb

Overview

Public: a simple middleware that lives at the end of the internal chain and simply executes each batch operation.

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Executor

Public: initialize the middleware.



8
9
10
# File 'lib/batch_api/processor/executor.rb', line 8

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object

Public: execute the batch operation.



13
14
15
# File 'lib/batch_api/processor/executor.rb', line 13

def call(env)
  env[:op].execute
end