Class: ActionController::Caching::Actions::ActionCachePath
- Defined in:
- lib/action_controller/caching.rb
Instance Attribute Summary collapse
-
#extension ⇒ Object
readonly
Returns the value of attribute extension.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(controller, options = {}) ⇒ ActionCachePath
constructor
A new instance of ActionCachePath.
Constructor Details
#initialize(controller, options = {}) ⇒ ActionCachePath
Returns a new instance of ActionCachePath.
275 276 277 278 279 280 281 |
# File 'lib/action_controller/caching.rb', line 275 def initialize(controller, = {}) @extension = extract_extension(controller.request.path) path = controller.url_for().split('://').last normalize!(path) add_extension!(path, @extension) @path = URI.unescape(path) end |
Instance Attribute Details
#extension ⇒ Object (readonly)
Returns the value of attribute extension.
267 268 269 |
# File 'lib/action_controller/caching.rb', line 267 def extension @extension end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
267 268 269 |
# File 'lib/action_controller/caching.rb', line 267 def path @path end |
Class Method Details
.path_for(controller, options) ⇒ Object
270 271 272 |
# File 'lib/action_controller/caching.rb', line 270 def path_for(controller, ) new(controller, ).path end |