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