Class: TreeHaver::NormalizedTreeNode
- Inherits:
-
Struct
- Object
- Struct
- TreeHaver::NormalizedTreeNode
- Defined in:
- lib/tree_haver/contracts.rb
Instance Attribute Summary collapse
-
#anonymous ⇒ Object
Returns the value of attribute anonymous.
-
#backend_kind ⇒ Object
Returns the value of attribute backend_kind.
-
#backend_roles ⇒ Object
Returns the value of attribute backend_roles.
-
#child_ids ⇒ Object
Returns the value of attribute child_ids.
-
#field_name ⇒ Object
Returns the value of attribute field_name.
-
#has_source_text ⇒ Object
Returns the value of attribute has_source_text.
-
#id ⇒ Object
Returns the value of attribute id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#named ⇒ Object
Returns the value of attribute named.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#role ⇒ Object
Returns the value of attribute role.
-
#semantic_roles ⇒ Object
Returns the value of attribute semantic_roles.
-
#source_fragment ⇒ Object
Returns the value of attribute source_fragment.
-
#span ⇒ Object
Returns the value of attribute span.
-
#unsupported_features ⇒ Object
Returns the value of attribute unsupported_features.
Instance Method Summary collapse
Instance Attribute Details
#anonymous ⇒ Object
Returns the value of attribute anonymous
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def anonymous @anonymous end |
#backend_kind ⇒ Object
Returns the value of attribute backend_kind
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def backend_kind @backend_kind end |
#backend_roles ⇒ Object
Returns the value of attribute backend_roles
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def backend_roles @backend_roles end |
#child_ids ⇒ Object
Returns the value of attribute child_ids
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def child_ids @child_ids end |
#field_name ⇒ Object
Returns the value of attribute field_name
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def field_name @field_name end |
#has_source_text ⇒ Object
Returns the value of attribute has_source_text
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def has_source_text @has_source_text end |
#id ⇒ Object
Returns the value of attribute id
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def id @id end |
#kind ⇒ Object
Returns the value of attribute kind
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def kind @kind end |
#metadata ⇒ Object
Returns the value of attribute metadata
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def @metadata end |
#named ⇒ Object
Returns the value of attribute named
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def named @named end |
#parent_id ⇒ Object
Returns the value of attribute parent_id
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def parent_id @parent_id end |
#role ⇒ Object
Returns the value of attribute role
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def role @role end |
#semantic_roles ⇒ Object
Returns the value of attribute semantic_roles
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def semantic_roles @semantic_roles end |
#source_fragment ⇒ Object
Returns the value of attribute source_fragment
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def source_fragment @source_fragment end |
#span ⇒ Object
Returns the value of attribute span
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def span @span end |
#unsupported_features ⇒ Object
Returns the value of attribute unsupported_features
539 540 541 |
# File 'lib/tree_haver/contracts.rb', line 539 def unsupported_features @unsupported_features end |
Instance Method Details
#to_h ⇒ Object
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/tree_haver/contracts.rb', line 558 def to_h { id: id, kind: kind, role: role, parent_id: parent_id, child_ids: child_ids, span: span.to_h, field_name: field_name, named: named, anonymous: anonymous, has_source_text: has_source_text, source_fragment: source_fragment, backend_kind: backend_kind, semantic_roles: semantic_roles || [], backend_roles: backend_roles || [], unsupported_features: unsupported_features || [], metadata: || {} } end |