lib/wayfarer/cli/route_printer.rb in wayfarer-0.4.0 vs lib/wayfarer/cli/route_printer.rb in wayfarer-0.4.1
- old
+ new
@@ -75,22 +75,22 @@
end
def matcher_label(route)
return "Target" if route.is_a?(Wayfarer::Routing::TargetRoute)
- route.matcher.class.name.demodulize.delete_suffix("Matcher")
+ route.matcher.class.name.demodulize
end
def options(route)
return "" if route.is_a?(Wayfarer::Routing::RootRoute)
case (matcher = route.matcher)
- when Wayfarer::Routing::HostMatcher then matcher.host
- when Wayfarer::Routing::PathMatcher then matcher.path
- when Wayfarer::Routing::QueryMatcher then matcher.fields
- when Wayfarer::Routing::CustomMatcher then "##{route.action}"
- when Wayfarer::Routing::SchemeMatcher then matcher.scheme
- when Wayfarer::Routing::SuffixMatcher then matcher.suffix
+ when Wayfarer::Routing::Matchers::Host then matcher.host
+ when Wayfarer::Routing::Matchers::Path then matcher.path
+ when Wayfarer::Routing::Matchers::Query then matcher.fields
+ when Wayfarer::Routing::Matchers::Custom then "##{route.action}"
+ when Wayfarer::Routing::Matchers::Scheme then matcher.scheme
+ when Wayfarer::Routing::Matchers::Suffix then matcher.suffix
end
end
def params(route)
params = route.matcher.params(url)