Class: HandyToolbox::ToolRunner
- Inherits:
-
Object
- Object
- HandyToolbox::ToolRunner
- Defined in:
- lib/handy_toolbox/tool_runner.rb
Instance Method Summary collapse
-
#initialize ⇒ ToolRunner
constructor
A new instance of ToolRunner.
- #queue(tool) ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize ⇒ ToolRunner
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 |
#run ⇒ Object
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 |