Class: Fdlint::Parser::Node
Instance Attribute Summary collapse
-
#position ⇒ Object
Returns the value of attribute position.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #=~(other) ⇒ Object
-
#initialize(text = '', position = nil) ⇒ Node
constructor
A new instance of Node.
- #to_s ⇒ Object
Constructor Details
#initialize(text = '', position = nil) ⇒ Node
Returns a new instance of Node.
8 9 10 11 12 13 14 |
# File 'lib/fdlint/parser/node.rb', line 8 def initialize(text = '', position = nil) if text.is_a? Node @text, @position = text.text, text.position else @text, @position = (text || '').strip, position end end |