Class: Raml::Response
- Inherits:
-
Object
- Object
- Raml::Response
- Defined in:
- lib/raml/response.rb
Instance Attribute Summary collapse
-
#bodies ⇒ Object
Returns the value of attribute bodies.
-
#code ⇒ Object
Returns the value of attribute code.
-
#description ⇒ Object
Returns the value of attribute description.
Instance Method Summary collapse
- #content_types ⇒ Object
-
#initialize(code) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(code) ⇒ Response
Returns a new instance of Response.
5 6 7 8 |
# File 'lib/raml/response.rb', line 5 def initialize(code) @code = code @bodies = [] end |
Instance Attribute Details
#bodies ⇒ Object
Returns the value of attribute bodies.
3 4 5 |
# File 'lib/raml/response.rb', line 3 def bodies @bodies end |
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/raml/response.rb', line 3 def code @code end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/raml/response.rb', line 3 def description @description end |
Instance Method Details
#content_types ⇒ Object
10 11 12 |
# File 'lib/raml/response.rb', line 10 def content_types bodies.map {|body| body.content_type }.uniq end |