Class: ActiveSupport::Callbacks::CallTemplate::ProcCall
Relationships & Source Files | |
Inherits: | Object |
Defined in: | activesupport/lib/active_support/callbacks.rb |
Class Method Summary
- .new(target) ⇒ ProcCall constructor
Instance Method Summary
Constructor Details
.new(target) ⇒ ProcCall
# File 'activesupport/lib/active_support/callbacks.rb', line 507
def initialize(target) @override_target = target end
Instance Method Details
#expand(target, value, block)
[ GitHub ]# File 'activesupport/lib/active_support/callbacks.rb', line 511
def (target, value, block) [@override_target || target, block, :call, target, value] end
#inverted_lambda
[ GitHub ]# File 'activesupport/lib/active_support/callbacks.rb', line 521
def inverted_lambda lambda do |target, value, &block| !(@override_target || target).call(target, value, &block) end end
#make_lambda
[ GitHub ]# File 'activesupport/lib/active_support/callbacks.rb', line 515
def make_lambda lambda do |target, value, &block| (@override_target || target).call(target, value, &block) end end