Module: Sinatra::AdvancedRoutes::ArrayMethods

Defined in:
lib/sinatra/advanced_routes.rb

Instance Method Summary collapse

Instance Method Details

#signatureObject



23
24
25
# File 'lib/sinatra/advanced_routes.rb', line 23

def signature
  self
end

#to_route(verb, args = {}) ⇒ Object



10
11
12
# File 'lib/sinatra/advanced_routes.rb', line 10

def to_route(verb, args = {})
  dup.to_route! verb, args
end

#to_route!(verb, args = {}) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/sinatra/advanced_routes.rb', line 14

def to_route!(verb, args = {})
  extend Sinatra::AdvancedRoutes::Route
  self.verb = verb
  args.each do |key, value|
    send "#{key}=", value
  end
  self
end