Class: ActionController::Caching::Actions::ActionCachePath
- Defined in:
- lib/action_controller/caching.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #extension ⇒ Object
-
#initialize(controller, options = {}) ⇒ ActionCachePath
constructor
A new instance of ActionCachePath.
- #path ⇒ Object
Constructor Details
#initialize(controller, options = {}) ⇒ ActionCachePath
Returns a new instance of ActionCachePath.
228 229 230 231 |
# File 'lib/action_controller/caching.rb', line 228 def initialize(controller, = {}) @controller = controller @options = end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
220 221 222 |
# File 'lib/action_controller/caching.rb', line 220 def controller @controller end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
220 221 222 |
# File 'lib/action_controller/caching.rb', line 220 def @options end |
Class Method Details
.path_for(*args, &block) ⇒ Object
223 224 225 |
# File 'lib/action_controller/caching.rb', line 223 def path_for(*args, &block) new(*args).path end |
Instance Method Details
#extension ⇒ Object
241 242 243 |
# File 'lib/action_controller/caching.rb', line 241 def extension @extension ||= extract_extension(controller.request.path) end |
#path ⇒ Object
233 234 235 236 237 238 239 |
# File 'lib/action_controller/caching.rb', line 233 def path return @path if @path @path = controller.url_for().split('://').last normalize! add_extension! URI.unescape(@path) end |