module AsciiMath::CLI
Public Class Methods
run(args)
click to toggle source
# File lib/asciimath/cli.rb, line 8 def self.run(args) asciimath = args.last output = '' if args.length == 1 || args.first == "mathml" output = AsciiMath.parse(asciimath).to_mathml elsif args.first == "html" output = AsciiMath.parse(asciimath).to_html elsif args.first == "latex" output = AsciiMath.parse(asciimath).to_latex end puts output end