Class: Wox::Task
- Inherits:
-
Object
- Object
- Wox::Task
- Defined in:
- lib/wox/task.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#run_command(text, options) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/wox/task.rb', line 3 def run_command text, result = `#{text}` File.open([:results], "w") {|f| f.write result } if $?.to_i == 0 puts "Success. Results in #{[:results]}" puts else fail exec "cat #{[:results]}" end end |