Class: Wayfinding::UrlResolverContext
- Inherits:
-
Object
- Object
- Wayfinding::UrlResolverContext
- Defined in:
- lib/wayfinding/url_resolver_context.rb
Overview
Evaluates a destination block as a URL by delegating route helper calls to
the registered engine and replacing a trailing _path with _url.
Instance Method Summary collapse
-
#initialize(url_helpers) ⇒ UrlResolverContext
constructor
A new instance of UrlResolverContext.
Constructor Details
#initialize(url_helpers) ⇒ UrlResolverContext
Returns a new instance of UrlResolverContext.
7 8 9 |
# File 'lib/wayfinding/url_resolver_context.rb', line 7 def initialize(url_helpers) @url_helpers = url_helpers end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object (private)
13 14 15 |
# File 'lib/wayfinding/url_resolver_context.rb', line 13 def method_missing(name, ...) @url_helpers.public_send(url_helper_name(name), ...) end |