Class: ActionDispatch::Journey::Formatter::RouteWithParams

Inherits:
Object
  • Object
show all
Defined in:
lib/action_dispatch/journey/formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(route, parameterized_parts, params) ⇒ RouteWithParams

Returns a new instance of RouteWithParams.



21
22
23
24
25
# File 'lib/action_dispatch/journey/formatter.rb', line 21

def initialize(route, parameterized_parts, params)
  @route = route
  @parameterized_parts = parameterized_parts
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



19
20
21
# File 'lib/action_dispatch/journey/formatter.rb', line 19

def params
  @params
end

Instance Method Details

#path(_) ⇒ Object



27
28
29
# File 'lib/action_dispatch/journey/formatter.rb', line 27

def path(_)
  @route.format(@parameterized_parts)
end