Class: Swagger::DefinitionSection
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- Swagger::DefinitionSection
- Includes:
- Hashie::Extensions::Coercion, Hashie::Extensions::IndifferentAccess, Attachable
- Defined in:
- lib/swagger/definition_section.rb
Direct Known Subclasses
APIDeclaration, V2::APIOperation, V2::Info, V2::Info::Contact, V2::Info::License, V2::Path, V2::Response
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Class Method Summary collapse
- .required_section(name, type) ⇒ Object private
- .section(name, type) ⇒ Object private
Instance Method Summary collapse
-
#initialize(hash) ⇒ DefinitionSection
constructor
A new instance of DefinitionSection.
Methods included from Attachable
#attach_parent, #attach_to_children, #root
Constructor Details
#initialize(hash) ⇒ DefinitionSection
Returns a new instance of DefinitionSection.
9 10 11 12 |
# File 'lib/swagger/definition_section.rb', line 9 def initialize(hash) super attach_to_children end |
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
7 8 9 |
# File 'lib/swagger/definition_section.rb', line 7 def parent @parent end |
Class Method Details
.required_section(name, type) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 32 |
# File 'lib/swagger/definition_section.rb', line 29 def self.required_section(name, type) property name, required: true coerce_key name, type end |
.section(name, type) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 |
# File 'lib/swagger/definition_section.rb', line 19 def self.section(name, type) property name coerce_key name, type end |