Class: Raml::Method
- Inherits:
-
Object
- Object
- Raml::Method
- Defined in:
- lib/raml/method.rb
Instance Attribute Summary collapse
-
#bodies ⇒ Object
Returns the value of attribute bodies.
-
#description ⇒ Object
Returns the value of attribute description.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#method ⇒ Object
Returns the value of attribute method.
-
#query_parameters ⇒ Object
Returns the value of attribute query_parameters.
-
#responses ⇒ Object
Returns the value of attribute responses.
Instance Method Summary collapse
- #content_types ⇒ Object
-
#initialize(method) ⇒ Method
constructor
A new instance of Method.
- #response_codes ⇒ Object
Constructor Details
#initialize(method) ⇒ Method
Returns a new instance of Method.
7 8 9 10 11 12 |
# File 'lib/raml/method.rb', line 7 def initialize(method) @method = method @responses = [] @query_parameters = [] @bodies = [] end |
Instance Attribute Details
#bodies ⇒ Object
Returns the value of attribute bodies.
4 5 6 |
# File 'lib/raml/method.rb', line 4 def bodies @bodies end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/raml/method.rb', line 4 def description @description end |
#display_name ⇒ Object
Returns the value of attribute display_name.
4 5 6 |
# File 'lib/raml/method.rb', line 4 def display_name @display_name end |
#headers ⇒ Object
Returns the value of attribute headers.
4 5 6 |
# File 'lib/raml/method.rb', line 4 def headers @headers end |
#method ⇒ Object
Returns the value of attribute method.
4 5 6 |
# File 'lib/raml/method.rb', line 4 def method @method end |
#query_parameters ⇒ Object
Returns the value of attribute query_parameters.
4 5 6 |
# File 'lib/raml/method.rb', line 4 def query_parameters @query_parameters end |
#responses ⇒ Object
Returns the value of attribute responses.
4 5 6 |
# File 'lib/raml/method.rb', line 4 def responses @responses end |
Instance Method Details
#content_types ⇒ Object
18 19 20 |
# File 'lib/raml/method.rb', line 18 def content_types responses.map {|response| response.content_type }.flatten.uniq end |
#response_codes ⇒ Object
14 15 16 |
# File 'lib/raml/method.rb', line 14 def response_codes responses.map {|responses| response.code } end |