Class: Wolfpack::CLI

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

Instance Method Summary collapse

Instance Method Details

#exec(command) ⇒ Object



88
89
90
91
92
93
94
# File 'lib/wolfpack.rb', line 88

def exec(command)
  # Parse out an integer for the # of processors the user specifies since
  # thor doesn't return an integer for its params.
  processes = options[:processes].to_i if options[:processes]

  Wolfpack::Runner.new(command, options[:args], options[:config]).run(processes)
end

#processorsObject



102
103
104
# File 'lib/wolfpack.rb', line 102

def processors
  puts Wolfpack.processor_count
end

#versionObject



97
98
99
# File 'lib/wolfpack.rb', line 97

def version
  puts Wolfpack::VERSION
end