Class: Aquarium::Aspects::AroundAdviceChainNode
- Inherits:
-
AdviceChainNode
- Object
- AdviceChainNode
- Aquarium::Aspects::AroundAdviceChainNode
- Defined in:
- lib/aquarium/aspects/advice.rb
Constant Summary
Constants inherited from AdviceChainNode
Aquarium::Aspects::AdviceChainNode::NIL_OBJECT
Instance Method Summary collapse
- #advice_wrapper(jp) ⇒ Object
-
#initialize(options = {}) ⇒ AroundAdviceChainNode
constructor
A new instance of AroundAdviceChainNode.
Methods inherited from AdviceChainNode
#call, #call_advice, #each, #empty?, #invoke_original_join_point, #last, #size
Constructor Details
#initialize(options = {}) ⇒ AroundAdviceChainNode
Returns a new instance of AroundAdviceChainNode.
261 262 263 |
# File 'lib/aquarium/aspects/advice.rb', line 261 def initialize = {} super end |
Instance Method Details
#advice_wrapper(jp) ⇒ Object
264 265 266 267 268 269 270 271 |
# File 'lib/aquarium/aspects/advice.rb', line 264 def advice_wrapper jp update_current_context jp jp.context.advice_kind = :around jp.context.proceed_proc = next_node result = call_advice jp reset_current_context jp result end |