Module: Roast::TaskContext
Defined Under Namespace
Classes: PathElement
Instance Method Summary collapse
-
#begin_cog(cog) ⇒ Object
: (Cog) -> Array.
-
#begin_execution_manager(execution_manager) ⇒ Object
: (ExecutionManager) -> Array.
-
#end ⇒ Object
: () -> [PathElement, Array].
-
#path ⇒ Object
: () -> Array.
Instance Method Details
#begin_cog(cog) ⇒ Object
: (Cog) -> Array
28 29 30 |
# File 'lib/roast/task_context.rb', line 28 def begin_cog(cog) begin_element(PathElement.new(cog:)) end |
#begin_execution_manager(execution_manager) ⇒ Object
: (ExecutionManager) -> Array
33 34 35 |
# File 'lib/roast/task_context.rb', line 33 def begin_execution_manager(execution_manager) begin_element(PathElement.new(execution_manager:)) end |
#end ⇒ Object
: () -> [PathElement, Array]
38 39 40 41 42 |
# File 'lib/roast/task_context.rb', line 38 def end Event << { end: Fiber[:path]&.last } el = Fiber[:path]&.pop [el, path] end |
#path ⇒ Object
: () -> Array
23 24 25 |
# File 'lib/roast/task_context.rb', line 23 def path Fiber[:path]&.deep_dup || [] end |