module DDC::ResponseBuilder
Public Instance Methods
created(obj)
click to toggle source
# File lib/ddc/response_builder.rb, line 11 def created(obj) {status: :created, object: obj} end
deleted()
click to toggle source
# File lib/ddc/response_builder.rb, line 19 def deleted {status: :deleted} end
not_found()
click to toggle source
# File lib/ddc/response_builder.rb, line 3 def not_found {status: :not_found} end
not_valid(obj)
click to toggle source
# File lib/ddc/response_builder.rb, line 15 def not_valid(obj) {status: :not_valid, errors: obj.errors.to_hash} end
ok(obj)
click to toggle source
# File lib/ddc/response_builder.rb, line 7 def ok(obj) {status: :ok, object: obj} end