Class: ActionDispatch::Journey::Formatter::RouteWithParams
- Inherits:
-
Object
- Object
- ActionDispatch::Journey::Formatter::RouteWithParams
- Defined in:
- lib/action_dispatch/journey/formatter.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(route, parameterized_parts, params) ⇒ RouteWithParams
constructor
A new instance of RouteWithParams.
- #path(_) ⇒ Object
Constructor Details
#initialize(route, parameterized_parts, params) ⇒ RouteWithParams
Returns a new instance of RouteWithParams.
23 24 25 26 27 |
# File 'lib/action_dispatch/journey/formatter.rb', line 23 def initialize(route, parameterized_parts, params) @route = route @parameterized_parts = parameterized_parts @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
21 22 23 |
# File 'lib/action_dispatch/journey/formatter.rb', line 21 def params @params end |
Instance Method Details
#path(_) ⇒ Object
29 30 31 |
# File 'lib/action_dispatch/journey/formatter.rb', line 29 def path(_) @route.format(@parameterized_parts) end |