Class: AsciiMath::AST::ValueNode
Direct Known Subclasses
Color, Identifier, Number, Symbol, Text
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(value) ⇒ ValueNode
constructor
A new instance of ValueNode.
- #to_s ⇒ Object
Constructor Details
#initialize(value) ⇒ ValueNode
Returns a new instance of ValueNode.
311 312 313 314 |
# File 'lib/asciimath/ast.rb', line 311 def initialize(value) super() @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
309 310 311 |
# File 'lib/asciimath/ast.rb', line 309 def value @value end |
Instance Method Details
#==(o) ⇒ Object
320 321 322 |
# File 'lib/asciimath/ast.rb', line 320 def ==(o) o.class == self.class && o.value == value end |
#to_s ⇒ Object
316 317 318 |
# File 'lib/asciimath/ast.rb', line 316 def to_s value.to_s end |