123456789_123456789_123456789_123456789_123456789_

Class: ActionDispatch::Routing::RouteWrapper

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, SimpleDelegator
Instance Chain:
self, SimpleDelegator
Inherits: SimpleDelegator
  • ::Object
Defined in: actionpack/lib/action_dispatch/routing/inspector.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#engine?Boolean (readonly)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 64

def engine?
  app.engine?
end

#internal?Boolean (readonly)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 60

def internal?
  internal
end

Instance Method Details

#action

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 56

def action
  parts.include?(:action) ? ":action" : requirements[:action]
end

#constraints

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 28

def constraints
  requirements.except(:controller, :action)
end

#controller

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 52

def controller
  parts.include?(:controller) ? ":controller" : requirements[:controller]
end

#endpoint

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 17

def endpoint
  case
  when app.dispatcher?
    "#{controller}##{action}"
  when rack_app.is_a?(Proc)
    "Inline handler (Proc/Lambda)"
  else
    rack_app.inspect
  end
end

#matches_filter?(filter, value) ⇒ Boolean

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 11

def matches_filter?(filter, value)
  return __getobj__.path.match(value) if filter == :exact_path_match

  value.match?(public_send(filter))
end

#name

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 40

def name
  super.to_s
end

#path

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 36

def path
  super.spec.to_s
end

#rack_app

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 32

def rack_app
  app.rack_app
end

#reqs

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 44

def reqs
  @reqs ||= begin
    reqs = endpoint
    reqs += " #{constraints}" unless constraints.empty?
    reqs
  end
end