Module: Garner::Strategies::Keys::RequestPath
- Defined in:
- lib/garner/strategies/keys/request_path_strategy.rb
Overview
Inject the request path into the key.
Class Method Summary collapse
Class Method Details
.apply(key, context = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/garner/strategies/keys/request_path_strategy.rb', line 12 def apply(key, context = {}) key = key ? key.dup : {} key[field] = context[:request].path if context && context[:request] && context[:request].respond_to?(:path) key end |
.field ⇒ Object
8 9 10 |
# File 'lib/garner/strategies/keys/request_path_strategy.rb', line 8 def field :path end |