Sinatra::Base#helpers

  1185      public
   1186        # Makes the methods defined in the block and in the Modules given
   1187        # in `extensions` available to the handlers and templates
   1188        def helpers(*extensions, &block)
=> 1189          class_eval(&block)  if block_given?
   1190          include(*extensions) if extensions.any?
   1191        end

你可能感兴趣的:(Sinatra)