Class: AsciiMath::Expression
- Inherits:
-
Object
- Object
- AsciiMath::Expression
- Defined in:
- lib/asciimath/mathml.rb,
lib/asciimath/parser.rb
Instance Method Summary collapse
-
#initialize(asciimath, parsed_expression) ⇒ Expression
constructor
A new instance of Expression.
- #to_mathml(prefix = "", attrs = {}) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(asciimath, parsed_expression) ⇒ Expression
Returns a new instance of Expression.
540 541 542 543 |
# File 'lib/asciimath/parser.rb', line 540 def initialize(asciimath, parsed_expression) @asciimath = asciimath @parsed_expression = parsed_expression end |
Instance Method Details
#to_mathml(prefix = "", attrs = {}) ⇒ Object
127 128 129 |
# File 'lib/asciimath/mathml.rb', line 127 def to_mathml(prefix = "", attrs = {}) MathMLBuilder.new(prefix).append_expression(@parsed_expression, attrs).to_s end |
#to_s ⇒ Object
545 546 547 |
# File 'lib/asciimath/parser.rb', line 545 def to_s @asciimath end |