Class: Julewire::Core::Execution::Boundary
- Inherits:
-
Object
- Object
- Julewire::Core::Execution::Boundary
- Defined in:
- lib/julewire/core/execution/boundary.rb
Instance Method Summary collapse
-
#initialize(emit_summary_record:, summary_finalizer_failure:, emit_non_standard_exception_summaries:, before_call: nil) ⇒ Boundary
constructor
A new instance of Boundary.
- #start_execution(type:, **options) ⇒ Object
- #with_execution(type:, **options) ⇒ Object
Constructor Details
#initialize(emit_summary_record:, summary_finalizer_failure:, emit_non_standard_exception_summaries:, before_call: nil) ⇒ Boundary
Returns a new instance of Boundary.
24 25 26 27 28 29 30 |
# File 'lib/julewire/core/execution/boundary.rb', line 24 def initialize(emit_summary_record:, summary_finalizer_failure:, emit_non_standard_exception_summaries:, before_call: nil) @before_call = before_call @emit_summary_record = emit_summary_record @summary_finalizer_failure = summary_finalizer_failure @emit_non_standard_exception_summaries = emit_non_standard_exception_summaries end |
Instance Method Details
#start_execution(type:, **options) ⇒ Object
39 40 41 42 |
# File 'lib/julewire/core/execution/boundary.rb', line 39 def start_execution(type:, **) before_call!(:start_execution) open_context_execution(:start_execution, type: type, options: ) end |
#with_execution(type:, **options) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/julewire/core/execution/boundary.rb', line 32 def with_execution(type:, **, &) before_call!(:with_execution) raise ArgumentError, "block required" unless block_given? open_context_execution(:with_execution, type: type, options: , &) end |