class Hobby::Router::Route

Attributes

action[RW]
params[RW]
path[R]
to_proc[RW]
verb[R]

Public Class Methods

new(verb, path, &action) click to toggle source
# File lib/hobby/router/route.rb, line 3
def initialize verb, path, &action
  @verb, @path, @action = verb, path, action
  @params = {}
end

Public Instance Methods

with_params(params) click to toggle source
# File lib/hobby/router/route.rb, line 11
def with_params params
  new_route = dup
  new_route.params = params
  new_route
end