Module: AsciiMath::CLI

Defined in:
lib/asciimath/cli.rb

Class Method Summary collapse

Class Method Details

.run(args) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/asciimath/cli.rb', line 7

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
  end
  puts output
end