Class: Raml::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodiesObject

Returns the value of attribute bodies.



3
4
5
# File 'lib/raml/response.rb', line 3

def bodies
  @bodies
end

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/raml/response.rb', line 3

def code
  @code
end

Instance Method Details

#content_typesObject



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

def content_types
  bodies.map {|body| body.content_type }.uniq
end