Class: TreeHaver::KaitaiTreeAnalysis
- Inherits:
-
Struct
- Object
- Struct
- TreeHaver::KaitaiTreeAnalysis
- Defined in:
- lib/tree_haver/contracts.rb
Instance Attribute Summary collapse
-
#backend_ref ⇒ Object
Returns the value of attribute backend_ref.
-
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
-
#root ⇒ Object
Returns the value of attribute root.
-
#schema ⇒ Object
Returns the value of attribute schema.
-
#source_byte_length ⇒ Object
Returns the value of attribute source_byte_length.
Instance Method Summary collapse
Instance Attribute Details
#backend_ref ⇒ Object
Returns the value of attribute backend_ref
444 445 446 |
# File 'lib/tree_haver/contracts.rb', line 444 def backend_ref @backend_ref end |
#diagnostics ⇒ Object
Returns the value of attribute diagnostics
444 445 446 |
# File 'lib/tree_haver/contracts.rb', line 444 def diagnostics @diagnostics end |
#root ⇒ Object
Returns the value of attribute root
444 445 446 |
# File 'lib/tree_haver/contracts.rb', line 444 def root @root end |
#schema ⇒ Object
Returns the value of attribute schema
444 445 446 |
# File 'lib/tree_haver/contracts.rb', line 444 def schema @schema end |
#source_byte_length ⇒ Object
Returns the value of attribute source_byte_length
444 445 446 |
# File 'lib/tree_haver/contracts.rb', line 444 def source_byte_length @source_byte_length end |
Instance Method Details
#kind ⇒ Object
445 446 447 |
# File 'lib/tree_haver/contracts.rb', line 445 def kind "kaitai-tree" end |
#to_h ⇒ Object
449 450 451 452 453 454 455 456 457 458 |
# File 'lib/tree_haver/contracts.rb', line 449 def to_h { kind: kind, schema: schema, **(source_byte_length.nil? ? {} : { source_byte_length: source_byte_length }), root: root.to_h, backend_ref: backend_ref.to_h, diagnostics: (diagnostics || []).map(&:to_h) } end |