Module: Grape::DSL::Helpers::ClassMethods
- Defined in:
- lib/grape/dsl/helpers.rb
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.
35 36 37 38 39 |
# File 'lib/grape/dsl/helpers.rb', line 35 def helpers(*new_modules, &block) include_new_modules(new_modules) include_block(block) include_all_in_scope if !block && new_modules.empty? end |