Method: Nali::Generator#initialize
- Defined in:
- lib/nali/generator.rb
#initialize(args) ⇒ Generator
Returns a new instance of Generator.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/nali/generator.rb', line 5 def initialize( args ) if args.first == 'new' if args[1] then create_application args[1] else puts 'Enter a name for the application' end elsif [ 'm', 'model' ].include?( args.first ) if args[1] then create_model args[1] else puts 'Enter a name for the model' end elsif [ 'v', 'view' ].include?( args.first ) if args[1] then create_view args[1] else puts 'Enter a name for the view' end end end |