Module: Grape::API::Helpers
- Defined in:
- lib/grape/api.rb
Overview
This module extends user defined helpers to provide some API-specific functionality
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
Instance Method Summary collapse
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
626 627 628 |
# File 'lib/grape/api.rb', line 626 def api @api end |
Instance Method Details
#api_changed(new_api) ⇒ Object
632 633 634 635 |
# File 'lib/grape/api.rb', line 632 def api_changed(new_api) @api = new_api process_named_params end |
#params(name, &block) ⇒ Object
627 628 629 630 |
# File 'lib/grape/api.rb', line 627 def params(name, &block) @named_params ||= {} @named_params.merge! name => block end |