Class: Julewire::Core::Integration::Scoped
- Inherits:
-
Object
- Object
- Julewire::Core::Integration::Scoped
- Defined in:
- lib/julewire/core/integration/scoped.rb
Instance Method Summary collapse
-
#initialize(integration, runtime: nil) ⇒ Scoped
constructor
A new instance of Scoped.
- #record_failure(error, **metadata) ⇒ Object
- #record_success ⇒ Object
- #with_failure_health(component:, action:, **metadata) ⇒ Object
Constructor Details
#initialize(integration, runtime: nil) ⇒ Scoped
Returns a new instance of Scoped.
8 9 10 11 |
# File 'lib/julewire/core/integration/scoped.rb', line 8 def initialize(integration, runtime: nil) @integration = integration @runtime = runtime end |
Instance Method Details
#record_failure(error, **metadata) ⇒ Object
13 14 15 |
# File 'lib/julewire/core/integration/scoped.rb', line 13 def record_failure(error, **) Health.record_failure(@integration, error, runtime: @runtime, **) end |
#record_success ⇒ Object
17 18 19 |
# File 'lib/julewire/core/integration/scoped.rb', line 17 def record_success(*, **) Health.record_success(@integration, runtime: @runtime) end |
#with_failure_health(component:, action:, **metadata) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/julewire/core/integration/scoped.rb', line 21 def with_failure_health(component:, action:, **, &) Health.with_failure_health( @integration, component: component, action: action, runtime: @runtime, **, & ) end |