Class: ActionController::Caching::Actions::ActionCachePath
- Defined in:
- lib/action_controller/caching/actions.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.
119 120 121 122 123 124 125 |
# File 'lib/action_controller/caching/actions.rb', line 119 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.
111 112 113 |
# File 'lib/action_controller/caching/actions.rb', line 111 def extension @extension end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
111 112 113 |
# File 'lib/action_controller/caching/actions.rb', line 111 def path @path end |
Class Method Details
.path_for(controller, options) ⇒ Object
114 115 116 |
# File 'lib/action_controller/caching/actions.rb', line 114 def path_for(controller, ) new(controller, ).path end |