Class: Rambo::RamlModels::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/rambo/raml_models/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raml) ⇒ Response

Returns a new instance of Response.



6
7
8
# File 'lib/rambo/raml_models/response.rb', line 6

def initialize(raml)
  @schema = raml
end

Instance Attribute Details

#schemaObject (readonly)

Returns the value of attribute schema.



4
5
6
# File 'lib/rambo/raml_models/response.rb', line 4

def schema
  @schema
end

Instance Method Details

#bodiesObject



14
15
16
# File 'lib/rambo/raml_models/response.rb', line 14

def bodies
  @bodies ||= schema.bodies.map {|body| Rambo::RamlModels::Body.new(body) }
end

#status_codeObject



10
11
12
# File 'lib/rambo/raml_models/response.rb', line 10

def status_code
  schema.code
end