Class: Dao::Route::List
Instance Method Summary collapse
Methods inherited from Array
Instance Method Details
#add(path) ⇒ Object
74 75 76 77 78 |
# File 'lib/dao/route.rb', line 74 def add(path) route = Route.new(path) push(route) route end |
#match(name) ⇒ Object
80 81 82 83 84 85 86 |
# File 'lib/dao/route.rb', line 80 def match(name) each do |route| match = route.match(name) return route unless match.empty? end return nil end |