class Rufo::Command
def format_args(args)
def format_args(args) files = [] args.each do |arg| if Dir.exist?(arg) files.concat Dir["#{arg}/**/*.rb"].select(&File.method(:file?)) elsif File.exist?(arg) files << arg else STDERR.puts "Error: file or directory not found: #{arg}" end end changed = false files.each do |file| changed |= format_file file end exit 1 if changed end