Class: Plurimath::Asciimath

Inherits:
Object
  • Object
show all
Defined in:
lib/plurimath/asciimath.rb,
lib/plurimath/asciimath/parse.rb,
lib/plurimath/asciimath/parser.rb,
lib/plurimath/asciimath/constants.rb,
lib/plurimath/asciimath/transform.rb

Defined Under Namespace

Classes: Constants, Parse, Parser, Transform

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Asciimath

Returns a new instance of Asciimath.



8
9
10
# File 'lib/plurimath/asciimath.rb', line 8

def initialize(text)
  @text = text
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



6
7
8
# File 'lib/plurimath/asciimath.rb', line 6

def text
  @text
end

Instance Method Details

#to_formulaObject



12
13
14
# File 'lib/plurimath/asciimath.rb', line 12

def to_formula
  Parser.new(text).parse
end