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