Class: WeakSwaggerParameters::Definitions::ParamContainer

Inherits:
Object
  • Object
show all
Defined in:
lib/weak_swagger_parameters/definitions/param_container.rb

Direct Known Subclasses

Params, Path, Query

Instance Method Summary collapse

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