Class: CPEE::Console

Inherits:
Riddl::Implementation
  • Object
show all
Defined in:
lib/cpee/implementation.rb

Overview

}}}

Instance Method Summary collapse

Instance Method Details

#responseObject

{{{



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/cpee/implementation.rb', line 239

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