Class: Tzispa::Command::Cli::Generate

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

Instance Method Summary collapse

Instance Method Details

#api(name) ⇒ Object



40
41
42
43
44
# File 'lib/tzispa/command/cli/generate.rb', line 40

def api(name)
  hnd = Tzispa::Command::Api.new(name, options[:app])
  hnd.generate
  puts "Api handler '#{name}' has been created in #{options[:app]}"
end

#app(name) ⇒ Object



21
22
23
24
25
# File 'lib/tzispa/command/cli/generate.rb', line 21

def app(name)
  tzapp = Tzispa::Command::App.new(name)
  tzapp.generate(options[:host], options[:mount])
  puts "App '#{name}' has been created"
end

#project(name) ⇒ Object



12
13
14
15
# File 'lib/tzispa/command/cli/generate.rb', line 12

def project(name)
  Tzispa::Command::Project.new(name).generate
  puts "Project '#{name}' has been created"
end

#rig(name) ⇒ Object



31
32
33
34
35
# File 'lib/tzispa/command/cli/generate.rb', line 31

def rig(name)
  tpl = Tzispa::Command::Rig.new(name, options[:app], options[:type])
  tpl.generate
  puts "Rig #{options[:type]} template '#{name}' has been created in #{options[:app]}"
end