Class: Anisoptera::SyncEndpoint

Inherits:
Object
  • Object
show all
Includes:
Endpoint
Defined in:
lib/anisoptera/sync_endpoint.rb

Instance Method Summary collapse

Methods included from Endpoint

factory, #initialize

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/anisoptera/sync_endpoint.rb', line 7

def call(env)
  params = routing_params(env)
  job = Anisoptera::Commander.new( @config.base_path )
  convert = @handler.call(job, params)
  
  result = `#{convert.command}`
  
  headers = update_headers(convert)
  
  [200, headers, [result]]
end