Class: AsciiMath::AST::Symbol
- Defined in:
- lib/asciimath/ast.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from ValueNode
Attributes inherited from Node
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(value, text) ⇒ Symbol
constructor
A new instance of Symbol.
- #to_s ⇒ Object
Constructor Details
#initialize(value, text) ⇒ Symbol
Returns a new instance of Symbol.
344 345 346 347 |
# File 'lib/asciimath/ast.rb', line 344 def initialize(value, text) super(value) @text = text.dup.freeze end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
342 343 344 |
# File 'lib/asciimath/ast.rb', line 342 def text @text end |
Instance Method Details
#==(o) ⇒ Object
349 350 351 |
# File 'lib/asciimath/ast.rb', line 349 def ==(o) super && o.text == text end |
#to_s ⇒ Object
353 354 355 |
# File 'lib/asciimath/ast.rb', line 353 def to_s text end |