Class: HandyToolbox::ToolRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/handy_toolbox/tool_runner.rb

Instance Method Summary collapse

Constructor Details

#initializeToolRunner

Returns a new instance of ToolRunner.



5
6
7
# File 'lib/handy_toolbox/tool_runner.rb', line 5

def initialize
  @tool = nil
end

Instance Method Details

#queue(tool) ⇒ Object



9
10
11
# File 'lib/handy_toolbox/tool_runner.rb', line 9

def queue(tool)
  @tool = tool
end

#runObject



13
14
15
16
17
18
# File 'lib/handy_toolbox/tool_runner.rb', line 13

def run
  if !@tool.nil?
    puts @tool.cmd
    Kernel.exec @tool.cmd
  end
end