Class: Plushie::Event::DiagnosticMessage
- Inherits:
-
Data
- Object
- Data
- Plushie::Event::DiagnosticMessage
- Defined in:
- lib/plushie/event/diagnostic.rb
Overview
A structured diagnostic delivered through the renderer's diagnostic wire channel.
Wire shape: {type: "diagnostic", session, level, diagnostic: {kind, ...}}.
The +diagnostic+ field is one of the typed variants in
Diagnostic.
Instance Attribute Summary collapse
-
#diagnostic ⇒ Object
readonly
Returns the value of attribute diagnostic.
-
#diagnostic [Object] typed diagnostic variant([Object]) ⇒ Object
readonly
A structured diagnostic delivered through the renderer's diagnostic wire channel.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#level [Symbol] :info, :warn, or :error([Symbol], : warn) ⇒ Object
readonly
A structured diagnostic delivered through the renderer's diagnostic wire channel.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
-
#session [String] session the diagnostic is attributable to.([String]) ⇒ Object
readonly
An empty string for process-scoped diagnostics (font load failures, renderer startup / panic, writer-dead, anything that affects the whole renderer rather than a single session).
Instance Method Summary collapse
-
#initialize(session:, level:, diagnostic:) ⇒ DiagnosticMessage
constructor
A new instance of DiagnosticMessage.
Constructor Details
#initialize(session:, level:, diagnostic:) ⇒ DiagnosticMessage
Returns a new instance of DiagnosticMessage.
216 217 218 |
# File 'lib/plushie/event/diagnostic.rb', line 216 def initialize(session:, level:, diagnostic:) super end |
Instance Attribute Details
#diagnostic ⇒ Object (readonly)
Returns the value of attribute diagnostic
215 216 217 |
# File 'lib/plushie/event/diagnostic.rb', line 215 def diagnostic @diagnostic end |
#diagnostic [Object] typed diagnostic variant([Object]) ⇒ Object (readonly)
A structured diagnostic delivered through the renderer's diagnostic wire channel.
Wire shape: {type: "diagnostic", session, level, diagnostic: {kind, ...}}.
The +diagnostic+ field is one of the typed variants in
Plushie::Event::Diagnostic.
215 216 217 218 219 |
# File 'lib/plushie/event/diagnostic.rb', line 215 DiagnosticMessage = Data.define(:session, :level, :diagnostic) do def initialize(session:, level:, diagnostic:) super end end |
#level ⇒ Object (readonly)
Returns the value of attribute level
215 216 217 |
# File 'lib/plushie/event/diagnostic.rb', line 215 def level @level end |
#level [Symbol] :info, :warn, or :error([Symbol], : warn) ⇒ Object (readonly)
A structured diagnostic delivered through the renderer's diagnostic wire channel.
Wire shape: {type: "diagnostic", session, level, diagnostic: {kind, ...}}.
The +diagnostic+ field is one of the typed variants in
Plushie::Event::Diagnostic.
215 216 217 218 219 |
# File 'lib/plushie/event/diagnostic.rb', line 215 DiagnosticMessage = Data.define(:session, :level, :diagnostic) do def initialize(session:, level:, diagnostic:) super end end |
#session ⇒ Object (readonly)
Returns the value of attribute session
215 216 217 |
# File 'lib/plushie/event/diagnostic.rb', line 215 def session @session end |
#session [String] session the diagnostic is attributable to.([String]) ⇒ Object (readonly)
An empty string for process-scoped diagnostics (font load failures, renderer startup / panic, writer-dead, anything that affects the whole renderer rather than a single session). Non-empty for session-scoped diagnostics (widget panics, view errors, tree validation warnings, anything produced inside a session's update / apply pipeline).
215 216 217 218 219 |
# File 'lib/plushie/event/diagnostic.rb', line 215 DiagnosticMessage = Data.define(:session, :level, :diagnostic) do def initialize(session:, level:, diagnostic:) super end end |