Method: Sinatra::Base.helpers

Defined in:
lib/sinatra/base.rb

.helpers(*extensions, &block) ⇒ Object

Makes the methods defined in the block and in the Modules given in extensions available to the handlers and templates



1559
1560
1561
1562
# File 'lib/sinatra/base.rb', line 1559

def helpers(*extensions, &block)
  class_eval(&block)   if block_given?
  include(*extensions) if extensions.any?
end