Class: Textus::Hooks::FireReport
- Inherits:
-
Data
- Object
- Data
- Textus::Hooks::FireReport
- Defined in:
- lib/textus/hooks/fire_report.rb
Overview
Outcome of a single Dispatcher#publish call.
fired — hook names that ran to completion errored — hook names that raised timed_out — hook names whose worker thread exceeded the deadline
Callers that care about hook health (tests, strict embedders) can check #ok? or inspect #failures. The dispatcher itself never raises on a hook failure unless strict: true was passed to #publish.
Instance Attribute Summary collapse
-
#errored ⇒ Object
readonly
Returns the value of attribute errored.
-
#fired ⇒ Object
readonly
Returns the value of attribute fired.
-
#timed_out ⇒ Object
readonly
Returns the value of attribute timed_out.
Instance Method Summary collapse
- #failures ⇒ Object
-
#initialize(fired:, errored:, timed_out:) ⇒ FireReport
constructor
A new instance of FireReport.
- #ok? ⇒ Boolean
Constructor Details
#initialize(fired:, errored:, timed_out:) ⇒ FireReport
Returns a new instance of FireReport.
15 16 17 |
# File 'lib/textus/hooks/fire_report.rb', line 15 def initialize(fired:, errored:, timed_out:) super(fired: fired.dup.freeze, errored: errored.dup.freeze, timed_out: timed_out.dup.freeze) end |
Instance Attribute Details
#errored ⇒ Object (readonly)
Returns the value of attribute errored
14 15 16 |
# File 'lib/textus/hooks/fire_report.rb', line 14 def errored @errored end |
#fired ⇒ Object (readonly)
Returns the value of attribute fired
14 15 16 |
# File 'lib/textus/hooks/fire_report.rb', line 14 def fired @fired end |
#timed_out ⇒ Object (readonly)
Returns the value of attribute timed_out
14 15 16 |
# File 'lib/textus/hooks/fire_report.rb', line 14 def timed_out @timed_out end |
Instance Method Details
#failures ⇒ Object
20 |
# File 'lib/textus/hooks/fire_report.rb', line 20 def failures = errored + timed_out |
#ok? ⇒ Boolean
19 |
# File 'lib/textus/hooks/fire_report.rb', line 19 def ok? = errored.empty? && timed_out.empty? |