Class: Testcloud::Generator::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/testcloud/generator/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



8
9
10
# File 'lib/testcloud/generator/cli.rb', line 8

def command
  @command
end

Instance Method Details

#gem(gem_name) ⇒ Object



15
16
17
18
# File 'lib/testcloud/generator/cli.rb', line 15

def gem(gem_name)
  @command = Testcloud::Generator::Commands::Gem.new(options.merge(gemname: gem_name), self)
  @command.run
end

#use_case(name) ⇒ Object



21
22
23
24
# File 'lib/testcloud/generator/cli.rb', line 21

def use_case(name)
  @command = Testcloud::Generator::Commands::UseCase.new(options.merge(name: name), self)
  @command.run
end

#versionObject



27
28
29
30
# File 'lib/testcloud/generator/cli.rb', line 27

def version()
  require 'testcloud/generator/version'
  $stdout.puts 'testcloud_generator v%s' % Testcloud::Generator.version
end