class Aquarium::Aspects::AfterReturningAdviceChainNode

Public Class Methods

new(options = {}) click to toggle source
# File lib/aquarium/aspects/advice.rb, line 181
def initialize options = {}
  super options
end

Public Instance Methods

advice_wrapper(jp) click to toggle source
# File lib/aquarium/aspects/advice.rb, line 184
def advice_wrapper jp
  returned_value = next_node.call jp
  update_current_context jp
  jp.context.advice_kind = :after_returning
  jp.context.returned_value = returned_value
  call_advice jp
  result = jp.context.returned_value   # allow advice to modify the returned value
  reset_current_context jp
  result
end