aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/commands.rb
blob: cf7716fc83a5ed063fd9dcccf2917e47b9840b9f (plain) (blame)
1
2
3
4
5
6
7
commands = Dir["#{File.dirname(__FILE__)}/commands/*.rb"].collect { |file_path| File.basename(file_path).split(".").first }

if commands.include?(ARGV.first)
  require "#{File.dirname(__FILE__)}/commands/#{ARGV.shift}"
else
  puts "Choose: #{commands.join(", ")}"
end