Class: WeakSwaggerParameters::Definitions::Parameter
- Inherits:
-
Object
- Object
- WeakSwaggerParameters::Definitions::Parameter
- Includes:
- LeafDefinition
- Defined in:
- lib/weak_swagger_parameters/definitions/parameter.rb
Instance Method Summary collapse
- #apply_docs(parent_node) ⇒ Object
-
#initialize(location, type, name, description, options = {}) ⇒ Parameter
constructor
A new instance of Parameter.
Methods included from LeafDefinition
Constructor Details
#initialize(location, type, name, description, options = {}) ⇒ Parameter
Returns a new instance of Parameter.
8 9 10 |
# File 'lib/weak_swagger_parameters/definitions/parameter.rb', line 8 def initialize(location, type, name, description, = {}) @options = .merge(location: location, type: type, name: name, description: description) end |
Instance Method Details
#apply_docs(parent_node) ⇒ Object
12 13 14 15 16 |
# File 'lib/weak_swagger_parameters/definitions/parameter.rb', line 12 def apply_docs(parent_node) = WeakSwaggerParameters::Services::SwaggerOptionsAdapter.adapt(@options) parent_node.instance_eval { parameter } end |