Class: Tzispa::Cli

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

Instance Method Summary collapse

Instance Method Details

#consoleObject



44
45
46
47
48
49
50
# File 'lib/tzispa/cli.rb', line 44

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

#new(name) ⇒ Object



16
17
18
19
20
# File 'lib/tzispa/cli.rb', line 16

def new(name)
  require 'tzispa/commands/project'
  Tzispa::Commands::Project.new(name).generate
  puts "Project '#{name}' has been created"
end

#serverObject



32
33
34
35
36
37
38
# File 'lib/tzispa/cli.rb', line 32

def server
  if options[:help]
    invoke :help, ['server']
  else
    Tzispa::Commands::Server.new(options).start
  end
end

#versionObject



10
11
12
13
# File 'lib/tzispa/cli.rb', line 10

def version
  require 'tzispa/version'
  puts "v#{VERSION}"
end