Class: Raml::Response
- Inherits:
-
PropertiesNode
- Object
- Node
- PropertiesNode
- Raml::Response
- Includes:
- Bodies, Documentable, Global, Headers, Merge, Parent, Validation
- Defined in:
- lib/raml/node/response.rb
Instance Attribute Summary
Attributes included from Headers
Attributes included from Bodies
Attributes included from Parent
Attributes included from Documentable
Attributes inherited from PropertiesNode
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(name, properties, parent) ⇒ Response
constructor
A new instance of Response.
- #merge(other) ⇒ Object
Methods included from Validation
#classes_to_s, #validate_array, #validate_hash, #validate_property, #validate_string
Methods included from Merge
Methods included from Global
#default_media_type, #resource_type_declarations, #schema_declarations, #trait_declarations
Methods included from Documentable
Methods inherited from PropertiesNode
#_regexp_property, #non_scalar_properties, #scalar_properties
Methods inherited from Node
Constructor Details
#initialize(name, properties, parent) ⇒ Response
Returns a new instance of Response.
15 16 17 18 |
# File 'lib/raml/node/response.rb', line 15 def initialize(name, properties, parent) super @name = name.to_i end |
Instance Method Details
#merge(other) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/raml/node/response.rb', line 21 def merge(other) raise MergeError, "Response status codes don't match." if name != other.name super merge_properties other, :headers merge_properties other, :bodies self end |