Class: Reactive::Mvc::Controller::Filters::ClassMethods::ProcWithCallFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/reactive-mvc/controller/filters.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Filter

#excluded_actions, #filter, #included_actions

Instance Method Summary collapse

Methods inherited from Filter

#after?, #around?, #before?, #initialize, #run, #type

Constructor Details

This class inherits a constructor from Reactive::Mvc::Controller::Filters::ClassMethods::Filter

Instance Method Details

#call(controller, &block) ⇒ Object



482
483
484
485
486
# File 'lib/reactive-mvc/controller/filters.rb', line 482

def call(controller, &block)
  @filter.call(controller, block)
rescue LocalJumpError # a yield from a proc... no no bad dog.
  raise(Reactive::Mvc::Controller::Error, 'Cannot yield from a Proc type filter. The Proc must take two arguments and execute #call on the second argument.')
end