Class: Lotus::Routing::Route Private
- Inherits:
-
HttpRouter::Route
- Object
- HttpRouter::Route
- Lotus::Routing::Route
- Defined in:
- lib/lotus/routing/route.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Entry of the routing system
Instance Method Summary collapse
-
#generate(resolver, options = {}, &endpoint) ⇒ Object
private
Asks the given resolver to return an endpoint that will be associated with the other options.
-
#nested_router ⇒ Object
private
Introspect the given route to understand if there is a wrapped Lotus::Router.
Instance Method Details
#generate(resolver, options = {}, &endpoint) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Asks the given resolver to return an endpoint that will be associated
with the other options.
41 42 43 44 45 |
# File 'lib/lotus/routing/route.rb', line 41 def generate(resolver, = {}, &endpoint) self.to = resolver.resolve(, &endpoint) self.name = [:as].to_sym if [:as] self end |
#nested_router ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Introspect the given route to understand if there is a wrapped Lotus::Router
52 53 54 |
# File 'lib/lotus/routing/route.rb', line 52 def nested_router dest.routes if dest.respond_to?(:routes) end |