Class: Lotus::Cli
Overview
Instance Method Summary collapse
- #console ⇒ Object
- #generate(type = nil, app_name = nil, name = nil) ⇒ Object private
- #new(name = nil) ⇒ Object
- #routes ⇒ Object
- #server ⇒ Object
- #version ⇒ Object
Instance Method Details
#console ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/lotus/cli.rb', line 41 def console if [:help] invoke :help, ['console'] else require 'lotus/commands/console' Lotus::Commands::Console.new(environment).start end end |
#generate(type = nil, app_name = nil, name = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
92 93 94 95 96 97 98 99 |
# File 'lib/lotus/cli.rb', line 92 def generate(type = nil, app_name = nil, name = nil) if [:help] || (type.nil? && app_name.nil? && name.nil?) invoke :help, ['generate'] else require 'lotus/commands/generate' Lotus::Commands::Generate.new(type, app_name, name, environment, self).start end end |
#new(name = nil) ⇒ Object
73 74 75 76 77 78 79 80 |
# File 'lib/lotus/cli.rb', line 73 def new(name = nil) if [:help] || name.nil? invoke :help, ['new'] else require 'lotus/commands/new' Lotus::Commands::New.new(name, environment, self).start end end |
#routes ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/lotus/cli.rb', line 54 def routes if [:help] invoke :help, ['routes'] else require 'lotus/commands/routes' Lotus::Commands::Routes.new(environment).start end end |