Class: Dao::Route::List

Inherits:
Array
  • Object
show all
Defined in:
lib/dao/route.rb

Instance Method Summary collapse

Methods inherited from Array

#as_dao, #to_dao

Instance Method Details

#add(path) ⇒ Object



72
73
74
75
76
# File 'lib/dao/route.rb', line 72

def add(path)
  route = Route.new(path)
  push(route)
  route
end

#match(name) ⇒ Object



78
79
80
81
82
83
84
# File 'lib/dao/route.rb', line 78

def match(name)
  each do |route|
    match = route.match(name)
    return route if match
  end
  return nil
end