Module: Grape::DSL::Helpers
- Included in:
- API::Instance
- Defined in:
- lib/grape/dsl/helpers.rb
Defined Under Namespace
Modules: BaseHelper
Instance Method Summary collapse
-
#helpers(*new_modules, &block) ⇒ Object
Add helper methods that will be accessible from any endpoint within this namespace (and child namespaces).
Instance Method Details
#helpers(*new_modules, &block) ⇒ Object
Add helper methods that will be accessible from any endpoint within this namespace (and child namespaces).
When called without a block, all known helpers within this scope are included.
31 32 33 34 35 |
# File 'lib/grape/dsl/helpers.rb', line 31 def helpers(*new_modules, &block) include_new_modules(new_modules) include_block(block) include_all_in_scope if !block && new_modules.empty? end |