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
1008 1009 1010 |
# File 'lib/tree_haver/contracts.rb', line 1008 def backend_ref @backend_ref end |
#diagnostics ⇒ Object
Returns the value of attribute diagnostics
1008 1009 1010 |
# File 'lib/tree_haver/contracts.rb', line 1008 def diagnostics @diagnostics end |
#root ⇒ Object
Returns the value of attribute root
1008 1009 1010 |
# File 'lib/tree_haver/contracts.rb', line 1008 def root @root end |
#schema ⇒ Object
Returns the value of attribute schema
1008 1009 1010 |
# File 'lib/tree_haver/contracts.rb', line 1008 def schema @schema end |
#source_byte_length ⇒ Object
Returns the value of attribute source_byte_length
1008 1009 1010 |
# File 'lib/tree_haver/contracts.rb', line 1008 def source_byte_length @source_byte_length end |
Instance Method Details
#kind ⇒ Object
1010 1011 1012 |
# File 'lib/tree_haver/contracts.rb', line 1010 def kind 'kaitai-tree' end |
#to_h ⇒ Object
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 |
# File 'lib/tree_haver/contracts.rb', line 1014 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 |