Method: Sinatra::Base.helpers
- Defined in:
- lib/sinatra/base.rb
permalink .helpers(*extensions, &block) ⇒ Object
Makes the methods defined in the block and in the Modules given
in extensions
available to the handlers and templates
1555 1556 1557 1558 |
# File 'lib/sinatra/base.rb', line 1555 def helpers(*extensions, &block) class_eval(&block) if block_given? include(*extensions) if extensions.any? end |