Class: Rutter::Routes
- Inherits:
-
Object
- Object
- Rutter::Routes
- Extended by:
- Forwardable
- Defined in:
- lib/rutter/routes.rb
Overview
Routes URL builder.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, **args) ⇒ Object (protected)
56 57 58 59 60 61 |
# File 'lib/rutter/routes.rb', line 56 def method_missing(method_name, **args) named_route, type = method_name.to_s.split(/\_(path|url)\z/) return super unless type @router.public_send(type, named_route.to_sym, **args) end |