首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

Sinatra:Base#helpers

2012-06-27 
Sinatra::Base#helpers1185public1186# Makes the methods defined in the block and in the Modules give

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

热点排行