Class: RakeRoutesNormalizer::RouteSet
- Inherits:
-
Valuable
- Object
- Valuable
- RakeRoutesNormalizer::RouteSet
- Defined in:
- lib/rake_routes_normalizer/route_set.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#normalize ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/rake_routes_normalizer/route_set.rb', line 11 def normalize result = routes.inject(RouteSet.new) do|route_set, route| previous_route = route_set.routes.detect{|r| route.url_pattern == r.url_pattern } route_set.routes << route.normalize(:previous_route => previous_route) route_set end result.routes.sort! result end |