Class: Rambo::RamlModels::Response
- Inherits:
-
Object
- Object
- Rambo::RamlModels::Response
- Defined in:
- lib/rambo/raml_models/response.rb
Instance Attribute Summary collapse
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
- #bodies ⇒ Object
-
#initialize(raml) ⇒ Response
constructor
A new instance of Response.
- #status_code ⇒ Object
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
#schema ⇒ Object (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
#bodies ⇒ Object
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_code ⇒ Object
10 11 12 |
# File 'lib/rambo/raml_models/response.rb', line 10 def status_code schema.code end |