Class: Garner::Strategies::Context::Key::RequestPath
- Defined in:
- lib/garner/strategies/context/key/request_path.rb
Class Method Summary collapse
-
.apply(identity, ruby_context = nil) ⇒ Garner::Cache::Identity
Injects the request path into the key hash.
- .field ⇒ Object
Class Method Details
.apply(identity, ruby_context = nil) ⇒ Garner::Cache::Identity
Injects the request path into the key hash.
15 16 17 18 19 20 21 |
# File 'lib/garner/strategies/context/key/request_path.rb', line 15 def self.apply(identity, ruby_context = nil) return super unless ruby_context.respond_to?(:request) request = ruby_context.request identity.key(field => request.path) if request.respond_to?(:path) identity end |
.field ⇒ Object
6 7 8 |
# File 'lib/garner/strategies/context/key/request_path.rb', line 6 def self.field :request_path end |