class ApiSchema::Response

Attributes

code[R]
fields[R]
model[R]

Public Class Methods

new(code, model) click to toggle source
# File lib/api_schema/response.rb, line 6
def initialize(code, model)
  @code = code
  @model = model
  @fields = []
end

Public Instance Methods

method_missing(type, *args, &block) click to toggle source
# File lib/api_schema/response.rb, line 12
def method_missing(type, *args, &block)
  options = args[1] || {}
  @fields << Field.new(type, args[0], options)
end