Class: FriendlyRoutes::MultiComposer
- Inherits:
-
Object
- Object
- FriendlyRoutes::MultiComposer
- Defined in:
- lib/friendly_routes/services/multi_composer.rb
Overview
Compoer will map passed params to friendly_route params
Instance Attribute Summary collapse
-
#matched_route ⇒ Object
readonly
Returns the value of attribute matched_route.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(routes, params = {}) ⇒ MultiComposer
constructor
A new instance of MultiComposer.
Constructor Details
#initialize(routes, params = {}) ⇒ MultiComposer
Returns a new instance of MultiComposer.
8 9 10 11 |
# File 'lib/friendly_routes/services/multi_composer.rb', line 8 def initialize(routes, params = {}) @routes = routes @params = params.dup end |
Instance Attribute Details
#matched_route ⇒ Object (readonly)
Returns the value of attribute matched_route.
6 7 8 |
# File 'lib/friendly_routes/services/multi_composer.rb', line 6 def matched_route @matched_route end |
Instance Method Details
#call ⇒ Object
13 14 15 16 |
# File 'lib/friendly_routes/services/multi_composer.rb', line 13 def call compose unless @composed_params @composed_params end |