lib/synvert/cli.rb in synvert-0.0.4 vs lib/synvert/cli.rb in synvert-0.0.5

- old
+ new

@@ -13,11 +13,12 @@ opts.banner = "Usage: synvert path" end paths = optparse.parse(args) Configuration.instance.set :path, paths.first || Dir.pwd - Dir.glob(File.join(File.dirname(__FILE__), 'snippets/**/*.rb')).each do |file| - eval(File.read(file)).process + rewriters = Dir.glob(File.join(File.dirname(__FILE__), 'snippets/**/*.rb')).map do |file| + eval(File.read(file)) end + rewriters.map(&:process) end end end