Class: ActiveSupport::Callbacks::CallTemplate::InstanceExec1
Relationships & Source Files | |
Inherits: | Object |
Defined in: | activesupport/lib/active_support/callbacks.rb |
Class Method Summary
- .new(block) ⇒ InstanceExec1 constructor
Instance Method Summary
Constructor Details
.new(block) ⇒ InstanceExec1
# File 'activesupport/lib/active_support/callbacks.rb', line 460
def initialize(block) @override_block = block end
Instance Method Details
#expand(target, value, block)
[ GitHub ]# File 'activesupport/lib/active_support/callbacks.rb', line 464
def (target, value, block) [target, @override_block, :instance_exec, target] end
#inverted_lambda
[ GitHub ]# File 'activesupport/lib/active_support/callbacks.rb', line 474
def inverted_lambda lambda do |target, value, &block| !target.instance_exec(target, &@override_block) end end
#make_lambda
[ GitHub ]# File 'activesupport/lib/active_support/callbacks.rb', line 468
def make_lambda lambda do |target, value, &block| target.instance_exec(target, &@override_block) end end