Class: Sexpir::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/sexpir/runner.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.run(*arguments) ⇒ Object



9
10
11
# File 'lib/sexpir/runner.rb', line 9

def self.run *arguments
  new.run(arguments)
end

Instance Method Details

#run(arguments) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/sexpir/runner.rb', line 13

def run arguments
  compiler=Compiler.new
  compiler.options = args = parse_options(arguments)
  $options=compiler.options

  if filename=args[:filename]
    compiler.compile filename
  else
    puts "need an sexpir file : sexpir <file.sexp>"
  end
end