Class: ActionController::Filters::ClassMethods::Filter
- Defined in:
- lib/action_controller/filters.rb
Overview
Filter class is an abstract base class for all filters. Handles all of the included/excluded actions but contains no logic for calling the actual filters.
Direct Known Subclasses
ClassFilter, FilterProxy, MethodFilter, ProcFilter, ProcWithCallFilter, SymbolFilter
Instance Attribute Summary collapse
-
#excluded_actions ⇒ Object
readonly
:nodoc:.
-
#filter ⇒ Object
readonly
:nodoc:.
-
#included_actions ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
- #after? ⇒ Boolean
- #around? ⇒ Boolean
- #before? ⇒ Boolean
- #call(controller, &block) ⇒ Object
-
#initialize(filter) ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
#initialize(filter) ⇒ Filter
Returns a new instance of Filter.
396 397 398 |
# File 'lib/action_controller/filters.rb', line 396 def initialize(filter) @filter = filter end |
Instance Attribute Details
#excluded_actions ⇒ Object (readonly)
:nodoc:
394 395 396 |
# File 'lib/action_controller/filters.rb', line 394 def excluded_actions @excluded_actions end |
#filter ⇒ Object (readonly)
:nodoc:
394 395 396 |
# File 'lib/action_controller/filters.rb', line 394 def filter @filter end |
#included_actions ⇒ Object (readonly)
:nodoc:
394 395 396 |
# File 'lib/action_controller/filters.rb', line 394 def included_actions @included_actions end |
Instance Method Details
#after? ⇒ Boolean
404 405 406 |
# File 'lib/action_controller/filters.rb', line 404 def after? false end |
#around? ⇒ Boolean
408 409 410 |
# File 'lib/action_controller/filters.rb', line 408 def around? true end |
#before? ⇒ Boolean
400 401 402 |
# File 'lib/action_controller/filters.rb', line 400 def before? false end |
#call(controller, &block) ⇒ Object
412 413 414 |
# File 'lib/action_controller/filters.rb', line 412 def call(controller, &block) raise(ActionControllerError, 'No filter type: Nothing to do here.') end |