Class: TreeHaver::KaitaiTreeNode
- Inherits:
-
Struct
- Object
- Struct
- TreeHaver::KaitaiTreeNode
- Defined in:
- lib/tree_haver/contracts.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#schema_path ⇒ Object
Returns the value of attribute schema_path.
-
#span ⇒ Object
Returns the value of attribute span.
Instance Method Summary collapse
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children
990 991 992 |
# File 'lib/tree_haver/contracts.rb', line 990 def children @children end |
#fields ⇒ Object
Returns the value of attribute fields
990 991 992 |
# File 'lib/tree_haver/contracts.rb', line 990 def fields @fields end |
#kind ⇒ Object
Returns the value of attribute kind
990 991 992 |
# File 'lib/tree_haver/contracts.rb', line 990 def kind @kind end |
#schema_path ⇒ Object
Returns the value of attribute schema_path
990 991 992 |
# File 'lib/tree_haver/contracts.rb', line 990 def schema_path @schema_path end |
#span ⇒ Object
Returns the value of attribute span
990 991 992 |
# File 'lib/tree_haver/contracts.rb', line 990 def span @span end |
Instance Method Details
#to_h ⇒ Object
991 992 993 994 995 996 997 998 999 |
# File 'lib/tree_haver/contracts.rb', line 991 def to_h { kind: kind, schema_path: schema_path, span: span.to_h, fields: deep_dup(fields || {}), children: (children || []).map(&:to_h) } end |