Class: ActiveSupport::Callbacks::CallTemplate::InstanceExec0
- Defined in:
- lib/active_support/callbacks.rb
Instance Method Summary collapse
- #expand(target, value, block) ⇒ Object
-
#initialize(block) ⇒ InstanceExec0
constructor
A new instance of InstanceExec0.
- #inverted_lambda ⇒ Object
- #make_lambda ⇒ Object
Constructor Details
#initialize(block) ⇒ InstanceExec0
Returns a new instance of InstanceExec0.
438 439 440 |
# File 'lib/active_support/callbacks.rb', line 438 def initialize(block) @override_block = block end |
Instance Method Details
#expand(target, value, block) ⇒ Object
442 443 444 |
# File 'lib/active_support/callbacks.rb', line 442 def (target, value, block) [target, @override_block, :instance_exec] end |
#inverted_lambda ⇒ Object
452 453 454 455 456 |
# File 'lib/active_support/callbacks.rb', line 452 def inverted_lambda lambda do |target, value, &block| !target.instance_exec(&@override_block) end end |
#make_lambda ⇒ Object
446 447 448 449 450 |
# File 'lib/active_support/callbacks.rb', line 446 def make_lambda lambda do |target, value, &block| target.instance_exec(&@override_block) end end |