Class: Fanta::Task
- Inherits:
-
Object
- Object
- Fanta::Task
- Defined in:
- lib/fanta/task.rb
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/fanta/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 |