Class: TreeHaver::NormalizedParseResult
- Inherits:
-
Struct
- Object
- Struct
- TreeHaver::NormalizedParseResult
- Defined in:
- lib/tree_haver/contracts.rb
Instance Attribute Summary collapse
-
#backend_capability ⇒ Object
Returns the value of attribute backend_capability.
-
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#nodes ⇒ Object
Returns the value of attribute nodes.
-
#ok ⇒ Object
Returns the value of attribute ok.
-
#parse_error_tolerance ⇒ Object
Returns the value of attribute parse_error_tolerance.
-
#root_id ⇒ Object
Returns the value of attribute root_id.
-
#source_fragments_available ⇒ Object
Returns the value of attribute source_fragments_available.
Instance Method Summary collapse
Instance Attribute Details
#backend_capability ⇒ Object
Returns the value of attribute backend_capability
192 193 194 |
# File 'lib/tree_haver/contracts.rb', line 192 def backend_capability @backend_capability end |
#diagnostics ⇒ Object
Returns the value of attribute diagnostics
192 193 194 |
# File 'lib/tree_haver/contracts.rb', line 192 def diagnostics @diagnostics end |
#metadata ⇒ Object
Returns the value of attribute metadata
192 193 194 |
# File 'lib/tree_haver/contracts.rb', line 192 def @metadata end |
#nodes ⇒ Object
Returns the value of attribute nodes
192 193 194 |
# File 'lib/tree_haver/contracts.rb', line 192 def nodes @nodes end |
#ok ⇒ Object
Returns the value of attribute ok
192 193 194 |
# File 'lib/tree_haver/contracts.rb', line 192 def ok @ok end |
#parse_error_tolerance ⇒ Object
Returns the value of attribute parse_error_tolerance
192 193 194 |
# File 'lib/tree_haver/contracts.rb', line 192 def parse_error_tolerance @parse_error_tolerance end |
#root_id ⇒ Object
Returns the value of attribute root_id
192 193 194 |
# File 'lib/tree_haver/contracts.rb', line 192 def root_id @root_id end |
#source_fragments_available ⇒ Object
Returns the value of attribute source_fragments_available
192 193 194 |
# File 'lib/tree_haver/contracts.rb', line 192 def source_fragments_available @source_fragments_available end |
Instance Method Details
#to_h ⇒ Object
203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/tree_haver/contracts.rb', line 203 def to_h { ok: ok, backend_capability: backend_capability.to_h, root_id: root_id, nodes: (nodes || []).map(&:to_h), parse_error_tolerance: parse_error_tolerance.to_h, source_fragments_available: source_fragments_available, diagnostics: diagnostics || [], metadata: || {} } end |