class Skeleton::Response
Attributes
describe[RW]
description[RW]
summarize[RW]
summary[RW]
Public Instance Methods
header(field, options={})
click to toggle source
# File lib/skeleton/response.rb, line 34 def header(field, options={}) headers[field] = Skeleton::Header.new(options) end
headers()
click to toggle source
# File lib/skeleton/response.rb, line 11 def headers @headers ||= {} end
no_body()
click to toggle source
# File lib/skeleton/response.rb, line 15 def no_body @schema = nil end
schema(value=nil, &block)
click to toggle source
# File lib/skeleton/response.rb, line 23 def schema(value=nil, &block) if block @schema = Skeleton::Model.new @schema.instance_eval(&block) elsif value.is_a?(Hash) @schema = Skeleton::Schema.new(value) end @schema end
schema?()
click to toggle source
# File lib/skeleton/response.rb, line 19 def schema? !!@schema end