Class: Ariel::ExtractedNode
- Inherits:
-
Object
- Object
- Ariel::ExtractedNode
- Includes:
- NodeLike
- Defined in:
- lib/ariel/extracted_node.rb
Overview
Each ExtractedNode has a name, a tokenstream and a structure which points to the relevant StructureNode.
Instance Attribute Summary collapse
-
#tokenstream ⇒ Object
Returns the value of attribute tokenstream.
Attributes included from NodeLike
Instance Method Summary collapse
- #extracted_text ⇒ Object
-
#initialize(name, tokenstream, structure) ⇒ ExtractedNode
constructor
A new instance of ExtractedNode.
Methods included from NodeLike
Constructor Details
#initialize(name, tokenstream, structure) ⇒ ExtractedNode
Returns a new instance of ExtractedNode.
10 11 12 13 14 |
# File 'lib/ariel/extracted_node.rb', line 10 def initialize(name, tokenstream, structure) @children={} @meta = OpenStruct.new({:name=>name, :structure=>structure}) @tokenstream=tokenstream end |
Instance Attribute Details
#tokenstream ⇒ Object
Returns the value of attribute tokenstream.
8 9 10 |
# File 'lib/ariel/extracted_node.rb', line 8 def tokenstream @tokenstream end |
Instance Method Details
#extracted_text ⇒ Object
16 17 18 |
# File 'lib/ariel/extracted_node.rb', line 16 def extracted_text tokenstream.text end |