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

Sinatra:Base#get

2012-07-18 
Sinatra::Base#get1107# Defining a `GET` handler also automatically defines1108# a `HEAD` handler.11

Sinatra::Base#get
1107       # Defining a `GET` handler also automatically defines
1108       # a `HEAD` handler.
1109       def get(path, opts={}, &block)
1110         conditions = @conditions.dup
1111         route('GET', path, opts, &block)
1112
1113         @conditions = conditions
1114         route('HEAD', path, opts, &block)
1115       end

热点排行