Method: MagicPath::DynamicPath#resolve
- Defined in:
- lib/magic_path/dynamic_path.rb
#resolve(extra_params = {}) ⇒ Object
19 20 21 22 23 |
# File 'lib/magic_path/dynamic_path.rb', line 19 def resolve(extra_params = {}) return @locked_path unless @locked_path.nil? full_params = @params.merge(extra_params) @pattern.split('/').map { |f| f[0] == ':' ? _var(f[1..-1], full_params) : f }.join('/') end |