class Aquarium::Aspects::NoAdviceChainNode

When invoking the original method, we use object.send(original_method_name, *args) rather than object.method(…).call(*args). The latter fails when the original method calls super. This is a Ruby bug: www.ruby-forum.com/topic/124276

Public Class Methods

new(options = {}) click to toggle source

Note that we extract the block passed to the original method call, if any, from the context and pass it to method invocation.

Calls superclass method Aquarium::Aspects::AdviceChainNode::new
    # File lib/aquarium/aspects/advice.rb
161 def initialize options = {}
162   super options
163 end

Public Instance Methods

advice_wrapper(jp) click to toggle source
    # File lib/aquarium/aspects/advice.rb
164 def advice_wrapper jp
165   jp.context.advised_object.send @alias_method_name, *jp.context.parameters, &jp.context.block_for_method
166 end