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
426 427 428 |
# File 'lib/tree_haver/contracts.rb', line 426 def children @children end |
#fields ⇒ Object
Returns the value of attribute fields
426 427 428 |
# File 'lib/tree_haver/contracts.rb', line 426 def fields @fields end |
#kind ⇒ Object
Returns the value of attribute kind
426 427 428 |
# File 'lib/tree_haver/contracts.rb', line 426 def kind @kind end |
#schema_path ⇒ Object
Returns the value of attribute schema_path
426 427 428 |
# File 'lib/tree_haver/contracts.rb', line 426 def schema_path @schema_path end |
#span ⇒ Object
Returns the value of attribute span
426 427 428 |
# File 'lib/tree_haver/contracts.rb', line 426 def span @span end |
Instance Method Details
#to_h ⇒ Object
427 428 429 430 431 432 433 434 435 |
# File 'lib/tree_haver/contracts.rb', line 427 def to_h { kind: kind, schema_path: schema_path, span: span.to_h, fields: deep_dup(fields || {}), children: (children || []).map(&:to_h) } end |