Class: Kawaii::Routing::Services::ExtractParamsFromUrl
- Inherits:
-
Object
- Object
- Kawaii::Routing::Services::ExtractParamsFromUrl
- Defined in:
- lib/kawaii/routing/services/extract_params_from_url.rb
Instance Method Summary collapse
Instance Method Details
#call(path_pattern, url) ⇒ Object
5 6 7 8 9 |
# File 'lib/kawaii/routing/services/extract_params_from_url.rb', line 5 def call(path_pattern, url) regexp = pattern_to_regexp(path_pattern) matches = regexp.match(url) format_to_hash(matches) end |