Class: WeakSwaggerParameters::Definitions::ParamContainer
- Inherits:
-
Object
- Object
- WeakSwaggerParameters::Definitions::ParamContainer
- Defined in:
- lib/weak_swagger_parameters/definitions/param_container.rb
Instance Method Summary collapse
- #apply_docs(parent_node) ⇒ Object
- #apply_validations(parent_node) ⇒ Object
-
#initialize(&block) ⇒ ParamContainer
constructor
A new instance of ParamContainer.
Constructor Details
#initialize(&block) ⇒ ParamContainer
Returns a new instance of ParamContainer.
6 7 8 9 |
# File 'lib/weak_swagger_parameters/definitions/param_container.rb', line 6 def initialize(&block) @child_definitions = [] instance_eval(&block) end |
Instance Method Details
#apply_docs(parent_node) ⇒ Object
15 16 17 |
# File 'lib/weak_swagger_parameters/definitions/param_container.rb', line 15 def apply_docs(parent_node) @child_definitions.each { |definition| definition.apply_docs(parent_node) } end |
#apply_validations(parent_node) ⇒ Object
11 12 13 |
# File 'lib/weak_swagger_parameters/definitions/param_container.rb', line 11 def apply_validations(parent_node) @child_definitions.each { |definition| definition.apply_validations(parent_node) } end |