Method: Sinatra::Base.get
- Defined in:
- lib/sinatra/base.rb
permalink .get(path, opts = {}, &block) ⇒ Object
Defining a GET
handler also automatically defines
a HEAD
handler.
1529 1530 1531 1532 1533 1534 1535 |
# File 'lib/sinatra/base.rb', line 1529 def get(path, opts = {}, &block) conditions = @conditions.dup route('GET', path, opts, &block) @conditions = conditions route('HEAD', path, opts, &block) end |