class RewriteArrayFormulaeToArrays
Public Class Methods
rewrite(*args)
click to toggle source
# File src/rewrite/rewrite_array_formulae_to_arrays.rb, line 5 def self.rewrite(*args) new.rewrite(*args) end
Public Instance Methods
rewrite(input,output)
click to toggle source
# File src/rewrite/rewrite_array_formulae_to_arrays.rb, line 9 def rewrite(input,output) mapper = AstExpandArrayFormulae.new input.each_line do |line| content = line.split("\t") ast = eval(content.pop) output.puts "#{content.join("\t")}\t#{mapper.map(ast).inspect}" end end