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.
259 260 261 |
# File 'lib/aquarium/aspects/advice.rb', line 259 def initialize = {} super end |
Instance Method Details
#advice_wrapper(jp) ⇒ Object
262 263 264 265 266 267 268 269 |
# File 'lib/aquarium/aspects/advice.rb', line 262 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 |