Class: Swaggard::Swagger::Parameters::Query
- Defined in:
- lib/swaggard/swagger/parameters/query.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(string) ⇒ Query
constructor
A new instance of Query.
- #to_doc ⇒ Object
Constructor Details
#initialize(string) ⇒ Query
Returns a new instance of Query.
8 9 10 11 |
# File 'lib/swaggard/swagger/parameters/query.rb', line 8 def initialize(string) @in = 'query' parse(string) end |
Instance Method Details
#to_doc ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/swaggard/swagger/parameters/query.rb', line 13 def to_doc doc = super doc.merge!('enum' => @options) if @options.any? doc end |