Class: WeakSwaggerParameters::Definitions::ModelRef
- Inherits:
-
Object
- Object
- WeakSwaggerParameters::Definitions::ModelRef
- Defined in:
- lib/weak_swagger_parameters/definitions/model_ref.rb
Instance Method Summary collapse
- #apply_docs(parent_node) ⇒ Object
-
#initialize(model_class) ⇒ ModelRef
constructor
A new instance of ModelRef.
Constructor Details
#initialize(model_class) ⇒ ModelRef
Returns a new instance of ModelRef.
6 7 8 |
# File 'lib/weak_swagger_parameters/definitions/model_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 |
# File 'lib/weak_swagger_parameters/definitions/model_ref.rb', line 10 def apply_docs(parent_node) model_class = @model_class parent_node.instance_eval do schema do key :'$ref', model_class.docs_model_name end end end |