Module: Sinatra::Mapper
- Defined in:
- lib/sinatra/mapper.rb
Instance Method Summary collapse
-
#delete(path, opts = {}, &block) ⇒ Object
:nodoc.
-
#get(path, opts = {}, &block) ⇒ Object
:nodoc.
-
#head(path, opts = {}, &block) ⇒ Object
:nodoc.
-
#map(prefix) ⇒ Object
Set the prefix to be used for all routes in the scope.
-
#options(path, opts = {}, &block) ⇒ Object
:nodoc.
-
#patch(path, opts = {}, &block) ⇒ Object
:nodoc.
-
#post(path, opts = {}, &block) ⇒ Object
:nodoc.
-
#put(path, opts = {}, &block) ⇒ Object
:nodoc.
Instance Method Details
#delete(path, opts = {}, &block) ⇒ Object
:nodoc
25 26 27 |
# File 'lib/sinatra/mapper.rb', line 25 def delete(path, opts={}, &block) #:nodoc super("#{@prefix}#{path}", opts, &block) end |
#get(path, opts = {}, &block) ⇒ Object
:nodoc
13 14 15 |
# File 'lib/sinatra/mapper.rb', line 13 def get(path, opts={}, &block) #:nodoc super("#{@prefix}#{path}", opts, &block) end |
#head(path, opts = {}, &block) ⇒ Object
:nodoc
29 30 31 |
# File 'lib/sinatra/mapper.rb', line 29 def head(path, opts={}, &block) #:nodoc super("#{@prefix}#{path}", opts, &block) end |
#map(prefix) ⇒ Object
Set the prefix to be used for all routes in the scope
8 9 10 11 |
# File 'lib/sinatra/mapper.rb', line 8 def map(prefix) # TODO remove a possible trailing / @prefix = prefix end |
#options(path, opts = {}, &block) ⇒ Object
:nodoc
33 34 35 |
# File 'lib/sinatra/mapper.rb', line 33 def (path, opts={}, &block) #:nodoc super("#{@prefix}#{path}", opts, &block) end |
#patch(path, opts = {}, &block) ⇒ Object
:nodoc
37 38 39 |
# File 'lib/sinatra/mapper.rb', line 37 def patch(path, opts={}, &block) #:nodoc super("#{@prefix}#{path}", opts, &block) end |
#post(path, opts = {}, &block) ⇒ Object
:nodoc
21 22 23 |
# File 'lib/sinatra/mapper.rb', line 21 def post(path, opts={}, &block) #:nodoc super("#{@prefix}#{path}", opts, &block) end |
#put(path, opts = {}, &block) ⇒ Object
:nodoc
17 18 19 |
# File 'lib/sinatra/mapper.rb', line 17 def put(path, opts={}, &block) #:nodoc super("#{@prefix}#{path}", opts, &block) end |