Class: Lotus::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/lotus/cli.rb

Overview

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#consoleObject

Since:

  • 0.1.0



56
57
58
59
60
61
62
# File 'lib/lotus/cli.rb', line 56

def console
  if options[:help]
    invoke :help, ['console']
  else
    Lotus::Commands::Console.new(options).start
  end
end

#new(application_name) ⇒ Object

Since:

  • 0.1.0



82
83
84
85
86
87
88
89
90
# File 'lib/lotus/cli.rb', line 82

def new(application_name)
  if options[:help]
    invoke :help, ['new']
  elsif options[:architecture] == 'app'
    Lotus::Commands::New::App.new(options, application_name).start
  else
    Lotus::Commands::New::Container.new(options, application_name).start
  end
end

#routesObject

Since:

  • 0.1.0



98
99
100
101
102
103
104
105
# File 'lib/lotus/cli.rb', line 98

def routes
  if options[:help]
    invoke :help, ['routes']
  else
    require 'lotus/commands/routes'
    Lotus::Commands::Routes.new(options).start
  end
end

#serverObject

Since:

  • 0.1.0



38
39
40
41
42
43
44
45
# File 'lib/lotus/cli.rb', line 38

def server
  if options[:help]
    invoke :help, ['server']
  else
    require 'lotus/commands/server'
    Lotus::Commands::Server.new(options).start
  end
end

#versionObject

Since:

  • 0.1.0



14
15
16
17
# File 'lib/lotus/cli.rb', line 14

def version
  require 'lotus/version'
  puts "v#{ Lotus::VERSION }"
end