class RouteMechanic::Testing::RouteWrapper
This class just wraps ActionDispatch::Journey::Route
Public Instance Methods
action()
click to toggle source
# File lib/route_mechanic/testing/route_wrapper.rb, line 27 def action parts.include?(:action) ? ":action" : requirements[:action] end
controller()
click to toggle source
# File lib/route_mechanic/testing/route_wrapper.rb, line 23 def controller parts.include?(:controller) ? ":controller" : requirements[:controller] end
endpoint()
click to toggle source
# File lib/route_mechanic/testing/route_wrapper.rb, line 7 def endpoint app.dispatcher? ? "#{controller}##{action}" : app.rack_app.inspect end
internal?()
click to toggle source
# File lib/route_mechanic/testing/route_wrapper.rb, line 31 def internal? internal end
path()
click to toggle source
Calls superclass method
# File lib/route_mechanic/testing/route_wrapper.rb, line 11 def path super.spec.to_s end
reqs()
click to toggle source
# File lib/route_mechanic/testing/route_wrapper.rb, line 15 def reqs @reqs ||= begin reqs = endpoint reqs += " #{requirements.except(:controller, :action)}" unless requirements.except(:controller, :action).empty? reqs end end