Class: ActionController::Caching::Sweeper

Inherits:
ActiveRecord::Observer
  • Object
show all
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)



540
541
542
543
# File 'lib/action_controller/caching.rb', line 540

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

Instance Attribute Details

#controllerObject

Returns the value of attribute controller.



520
521
522
# File 'lib/action_controller/caching.rb', line 520

def controller
  @controller
end

Instance Method Details

#after(controller) ⇒ Object



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

def after(controller)
  callback(:after)
end

#before(controller) ⇒ Object



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

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