Class: Fiber
- Inherits:
-
Object
- Object
- Fiber
- Defined in:
- lib/aikido/zen/current_context.rb
Overview
The current context is stored in an additional Fiber instance variable and is though the aikido_current_context accessor methods.
Instance Attribute Summary collapse
- #aikido_current_context ⇒ Object private
Class Method Summary collapse
Instance Attribute Details
#aikido_current_context ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/aikido/zen/current_context.rb', line 8 def aikido_current_context @aikido_current_context end |
Class Method Details
.new(*args, **kwargs, &blk) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/aikido/zen/current_context.rb', line 18 def new(*args, **kwargs, &blk) context = Fiber.current.aikido_current_context new__internal_for_aikido_zen(*args, **kwargs) do |*args| Fiber.current.aikido_current_context = context blk.call(*args) end end |
.new__internal_for_aikido_zen ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 |
# File 'lib/aikido/zen/current_context.rb', line 16 alias_method :new__internal_for_aikido_zen, :new |