Class: ActionController::Filters::ClassMethods::Filter

Inherits:
Object
  • Object
show all
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.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_actionsObject (readonly)

:nodoc:



394
395
396
# File 'lib/action_controller/filters.rb', line 394

def excluded_actions
  @excluded_actions
end

#filterObject (readonly)

:nodoc:



394
395
396
# File 'lib/action_controller/filters.rb', line 394

def filter
  @filter
end

#included_actionsObject (readonly)

:nodoc:



394
395
396
# File 'lib/action_controller/filters.rb', line 394

def included_actions
  @included_actions
end

Instance Method Details

#after?Boolean

Returns:

  • (Boolean)


404
405
406
# File 'lib/action_controller/filters.rb', line 404

def after?
  false
end

#around?Boolean

Returns:

  • (Boolean)


408
409
410
# File 'lib/action_controller/filters.rb', line 408

def around?
  true
end

#before?Boolean

Returns:

  • (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