Class: Tuttle::Presenters::ActionDispatch::Routing::RouteWrapper

Inherits:
ActionDispatch::Routing::RouteWrapper
  • Object
show all
Defined in:
lib/tuttle/presenters/action_dispatch/routing/route_wrapper.rb

Instance Method Summary collapse

Instance Method Details

#actionObject



15
16
17
# File 'lib/tuttle/presenters/action_dispatch/routing/route_wrapper.rb', line 15

def action
  super if uses_dispatcher?
end

#controllerObject



11
12
13
# File 'lib/tuttle/presenters/action_dispatch/routing/route_wrapper.rb', line 11

def controller
  super if uses_dispatcher?
end

#endpoint_or_app_nameObject



7
8
9
# File 'lib/tuttle/presenters/action_dispatch/routing/route_wrapper.rb', line 7

def endpoint_or_app_name
  uses_dispatcher? ? endpoint : (rack_app.is_a?(Class) ? rack_app : rack_app.class)
end

#is_internal_to_rails?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/tuttle/presenters/action_dispatch/routing/route_wrapper.rb', line 23

def is_internal_to_rails?
  !!internal?
end

#uses_dispatcher?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/tuttle/presenters/action_dispatch/routing/route_wrapper.rb', line 19

def uses_dispatcher?
  rack_app.respond_to?(:dispatcher?)
end