Class: Dry::Effects::Providers::Fork
- Inherits:
-
Object
- Object
- Dry::Effects::Providers::Fork
- Defined in:
- lib/dry/effects/providers/fork.rb
Instance Attribute Summary collapse
-
#stack ⇒ Object
readonly
Returns the value of attribute stack.
Instance Method Summary collapse
Instance Attribute Details
#stack ⇒ Object (readonly)
Returns the value of attribute stack.
7 8 9 |
# File 'lib/dry/effects/providers/fork.rb', line 7 def stack @stack end |
Instance Method Details
#call ⇒ Object
14 15 16 17 |
# File 'lib/dry/effects/providers/fork.rb', line 14 def call @stack = Frame.stack super end |
#fork ⇒ Object
9 10 11 12 |
# File 'lib/dry/effects/providers/fork.rb', line 9 def fork stack = self.stack.dup -> &cont { Frame.spawn_fiber(stack.dup, &cont) } end |