Class: PaperTrailDiff::DiagnosticIssue
- Inherits:
-
Object
- Object
- PaperTrailDiff::DiagnosticIssue
- Defined in:
- lib/paper_trail_diff/diagnostics.rb,
sig/generated/paper_trail_diff/diagnostics.rbs
Overview
One immutable historical-reconstruction setup finding.
Instance Attribute Summary collapse
- #code ⇒ Symbol readonly
- #message ⇒ String readonly
- #path ⇒ String? readonly
- #severity ⇒ Symbol readonly
- #version_id ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(severity:, code:, message:, path: nil, version_id: nil) ⇒ DiagnosticIssue
constructor
: (severity: Symbol, code: Symbol, message: String, ?path: String?, ?version_id: untyped) -> void.
-
#to_h ⇒ Hash[Symbol, untyped]
: () -> Hash[Symbol, untyped].
Constructor Details
#initialize(severity:, code:, message:, path: nil, version_id: nil) ⇒ DiagnosticIssue
: (severity: Symbol, code: Symbol, message: String, ?path: String?, ?version_id: untyped) -> void
14 15 16 17 18 19 20 21 |
# File 'lib/paper_trail_diff/diagnostics.rb', line 14 def initialize(severity:, code:, message:, path: nil, version_id: nil) @severity = severity @code = code @message = Support.immutable_copy() @path = Support.immutable_copy(path) @version_id = Support.immutable_copy(version_id) freeze end |
Instance Attribute Details
#code ⇒ Symbol (readonly)
8 9 10 |
# File 'lib/paper_trail_diff/diagnostics.rb', line 8 def code @code end |
#message ⇒ String (readonly)
9 10 11 |
# File 'lib/paper_trail_diff/diagnostics.rb', line 9 def @message end |
#path ⇒ String? (readonly)
10 11 12 |
# File 'lib/paper_trail_diff/diagnostics.rb', line 10 def path @path end |
#severity ⇒ Symbol (readonly)
7 8 9 |
# File 'lib/paper_trail_diff/diagnostics.rb', line 7 def severity @severity end |
#version_id ⇒ Object (readonly)
11 12 13 |
# File 'lib/paper_trail_diff/diagnostics.rb', line 11 def version_id @version_id end |
Instance Method Details
#to_h ⇒ Hash[Symbol, untyped]
: () -> Hash[Symbol, untyped]
24 25 26 27 28 29 30 31 32 |
# File 'lib/paper_trail_diff/diagnostics.rb', line 24 def to_h { severity: severity, code: code, message: , path: path, version_id: version_id } end |