Module: WeakSwaggerParameters::Controller::ClassMethods
- Defined in:
- lib/weak_swagger_parameters/controller.rb
Instance Method Summary collapse
- #add_to_doc_section(doc_section) ⇒ Object
- #delete(action, path, description, &block) ⇒ Object
- #get(action, path, description, &block) ⇒ Object
- #in_doc_section?(doc_section) ⇒ Boolean
- #patch(action, path, description, &block) ⇒ Object
- #post(action, path, description, &block) ⇒ Object
- #put(action, path, description, &block) ⇒ Object
Instance Method Details
#add_to_doc_section(doc_section) ⇒ Object
8 9 10 11 |
# File 'lib/weak_swagger_parameters/controller.rb', line 8 def add_to_doc_section(doc_section) @doc_sections ||= [] @doc_sections << doc_section end |
#delete(action, path, description, &block) ⇒ Object
33 34 35 |
# File 'lib/weak_swagger_parameters/controller.rb', line 33 def delete(action, path, description, &block) api(:delete, action, path, description, &block) end |
#get(action, path, description, &block) ⇒ Object
17 18 19 |
# File 'lib/weak_swagger_parameters/controller.rb', line 17 def get(action, path, description, &block) api(:get, action, path, description, &block) end |
#in_doc_section?(doc_section) ⇒ Boolean
13 14 15 |
# File 'lib/weak_swagger_parameters/controller.rb', line 13 def in_doc_section?(doc_section) (@doc_sections || []).include?(doc_section) end |
#patch(action, path, description, &block) ⇒ Object
29 30 31 |
# File 'lib/weak_swagger_parameters/controller.rb', line 29 def patch(action, path, description, &block) api(:patch, action, path, description, &block) end |
#post(action, path, description, &block) ⇒ Object
21 22 23 |
# File 'lib/weak_swagger_parameters/controller.rb', line 21 def post(action, path, description, &block) api(:post, action, path, description, &block) end |
#put(action, path, description, &block) ⇒ Object
25 26 27 |
# File 'lib/weak_swagger_parameters/controller.rb', line 25 def put(action, path, description, &block) api(:put, action, path, description, &block) end |