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, #security_scheme_declarations, #trait_declarations
Methods inherited from PropertiesNode
#_regexp_property, #non_scalar_properties, #scalar_properties
Constructor Details
#initialize(name, properties, parent) ⇒ Response
Returns a new instance of Response.
13 14 15 16 |
# File 'lib/raml/node/response.rb', line 13 def initialize(name, properties, parent) super @name = name.to_i end |
Instance Method Details
#merge(other) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/raml/node/response.rb', line 19 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 |