Class: ActionController::Caching::Sweeper

Inherits:
ActiveRecord::Observer
  • Object
show all
Includes:
Reloadable::Subclasses
Defined in:
lib/action_controller/caching.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *arguments) ⇒ Object (private)



548
549
550
551
# File 'lib/action_controller/caching.rb', line 548

def method_missing(method, *arguments)
  return if @controller.nil?
  @controller.send(method, *arguments)
end

Instance Attribute Details

#controllerObject

Returns the value of attribute controller.



522
523
524
# File 'lib/action_controller/caching.rb', line 522

def controller
  @controller
end

Instance Method Details

#after(controller) ⇒ Object



533
534
535
536
537
# File 'lib/action_controller/caching.rb', line 533

def after(controller)
  callback(:after)
  # Clean up, so that the controller can be collected after this request
  self.controller = nil
end

#before(controller) ⇒ Object



528
529
530
531
# File 'lib/action_controller/caching.rb', line 528

def before(controller)
  self.controller = controller
  callback(:before)
end