lib/lotus/routing/route.rb in lotus-router-0.1.1 vs lib/lotus/routing/route.rb in lotus-router-0.2.0
- old
+ new
@@ -42,9 +42,18 @@
self.to = resolver.resolve(options, &endpoint)
self.name = options[:as].to_sym if options[:as]
self
end
+ # Introspect the given route to understand if there is a wrapped
+ # Lotus::Router
+ #
+ # @since 0.2.0
+ # @api private
+ def nested_router
+ dest.routes if dest.respond_to?(:routes)
+ end
+
private
def to=(dest = nil, &blk)
self.to dest, &blk
end
end