class SeaMule::Server
Public Instance Methods
read_json()
click to toggle source
# File lib/seamule/server.rb, line 56 def read_json JSON.parse(request.env['rack.input'].read) end
render_json(object)
click to toggle source
# File lib/seamule/server.rb, line 12 def render_json(object) response['Cache-Control'] = 'max-age=0, private, must-revalidate' content_type :json begin object.to_json rescue Errno::ECONNREFUSED status 500 end end
unprocessable_entity()
click to toggle source
# File lib/seamule/server.rb, line 52 def unprocessable_entity status 422 end