Class: TreeHaver::ParserDiagnostics
- Inherits:
-
Struct
- Object
- Struct
- TreeHaver::ParserDiagnostics
- Defined in:
- lib/tree_haver/contracts.rb
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#backend_ref ⇒ Object
Returns the value of attribute backend_ref.
-
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
Instance Method Summary collapse
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend
54 55 56 |
# File 'lib/tree_haver/contracts.rb', line 54 def backend @backend end |
#backend_ref ⇒ Object
Returns the value of attribute backend_ref
54 55 56 |
# File 'lib/tree_haver/contracts.rb', line 54 def backend_ref @backend_ref end |
#diagnostics ⇒ Object
Returns the value of attribute diagnostics
54 55 56 |
# File 'lib/tree_haver/contracts.rb', line 54 def diagnostics @diagnostics end |
Instance Method Details
#to_h ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/tree_haver/contracts.rb', line 55 def to_h { backend: backend, **(backend_ref ? { backend_ref: backend_ref.to_h } : {}), diagnostics: deep_dup(diagnostics || []) } end |