Class: ActiveSupport::Callbacks::CallTemplate::InstanceExec1
- Defined in:
- lib/active_support/callbacks.rb
Instance Method Summary collapse
- #expand(target, value, block) ⇒ Object
-
#initialize(block) ⇒ InstanceExec1
constructor
A new instance of InstanceExec1.
- #inverted_lambda ⇒ Object
- #make_lambda ⇒ Object
Constructor Details
#initialize(block) ⇒ InstanceExec1
Returns a new instance of InstanceExec1.
419 420 421 |
# File 'lib/active_support/callbacks.rb', line 419 def initialize(block) @override_block = block end |
Instance Method Details
#expand(target, value, block) ⇒ Object
423 424 425 |
# File 'lib/active_support/callbacks.rb', line 423 def (target, value, block) [target, @override_block, :instance_exec, target] end |
#inverted_lambda ⇒ Object
433 434 435 436 437 |
# File 'lib/active_support/callbacks.rb', line 433 def inverted_lambda lambda do |target, value, &block| !target.instance_exec(target, &@override_block) end end |
#make_lambda ⇒ Object
427 428 429 430 431 |
# File 'lib/active_support/callbacks.rb', line 427 def make_lambda lambda do |target, value, &block| target.instance_exec(target, &@override_block) end end |