Module: Grape::DSL::Helpers::BaseHelper
- Included in:
- API::Helpers
- Defined in:
- lib/grape/dsl/helpers.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.
65 66 67 |
# File 'lib/grape/dsl/helpers.rb', line 65 def api @api end |
Instance Method Details
#api_changed(new_api) ⇒ Object
71 72 73 74 |
# File 'lib/grape/dsl/helpers.rb', line 71 def api_changed(new_api) @api = new_api process_named_params end |
#params(name, &block) ⇒ Object
66 67 68 69 |
# File 'lib/grape/dsl/helpers.rb', line 66 def params(name, &block) @named_params ||= {} @named_params.merge! name => block end |