module Rufo::Command

def self.format(code, dir)

def self.format(code, dir)
  formatter = Rufo::Formatter.new(code)
  dot_rufo = find_dot_rufo(dir)
  if dot_rufo
    begin
      formatter.instance_eval(File.read(dot_rufo))
    rescue => ex
      STDERR.puts "Error evaluating #{dot_rufo}"
      raise ex
    end
  end
  formatter.format
  formatter.result
end