Method: CPEE::Console#response

Defined in:
lib/cpee/implementation.rb

#responseObject

{{{



267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/cpee/implementation.rb', line 267

def response
  controller = @a[0]
  id = @r[0].to_i
  unless controller[id]
    @status = 400
    return
  end
  Riddl::Parameter::Complex.new("res","text/plain") do
    begin
      controller[id].console(@p[0].value)
    rescue => e
      e.message
    end
  end
end