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.



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

#paramsObject (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