Class: Mddb::Generators::Run
- Inherits:
-
Object
- Object
- Mddb::Generators::Run
- Defined in:
- lib/mddb/generators.rb
Class Method Summary collapse
Class Method Details
.start ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/mddb/generators.rb', line 11 def self.start if ARGV.empty? puts "try one of the following" Mddb::Generators.list.each do |g| puts " #{g} <name>" end elsif Mddb::Generators.list.include? ARGV.first gen = ARGV.first ARGV.shift if ARGV.empty? puts "supply a name" else eval("Mddb::Generators::" + gen.capitalize + ".start") end end end |