Class: RakeRoutesNormalizer::App

Inherits:
Thor
  • Object
show all
Defined in:
lib/rake_routes_normalizer/app.rb

Instance Method Summary collapse

Instance Method Details

#normalize(text) ⇒ Object



4
5
6
7
8
9
# File 'lib/rake_routes_normalizer/app.rb', line 4

def normalize(text)
  table = RouteSet.parse(text).normalize.routes.map do |route|
    [route.url_pattern, route.http_verb, route.name, route.params.inspect]
  end
  print_table table
end