Class: WeakSwaggerParameters::Definitions::CollectionRef
- Inherits:
-
Object
- Object
- WeakSwaggerParameters::Definitions::CollectionRef
- Defined in:
- lib/weak_swagger_parameters/definitions/collection_ref.rb
Instance Method Summary collapse
- #apply_docs(parent_node) ⇒ Object
-
#initialize(model_class) ⇒ CollectionRef
constructor
A new instance of CollectionRef.
Constructor Details
#initialize(model_class) ⇒ CollectionRef
Returns a new instance of CollectionRef.
6 7 8 |
# File 'lib/weak_swagger_parameters/definitions/collection_ref.rb', line 6 def initialize(model_class) @model_class = model_class end |
Instance Method Details
#apply_docs(parent_node) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/weak_swagger_parameters/definitions/collection_ref.rb', line 10 def apply_docs(parent_node) model_class = @model_class parent_node.instance_eval do schema type: :array do items do key :'$ref', model_class.docs_model_name end end end end |