Class: Bard::CLI::Hurt

Inherits:
Command
  • Object
show all
Defined in:
lib/bard/cli/hurt.rb

Instance Method Summary collapse

Methods inherited from Command

desc, option, setup

Instance Method Details

#hurt(*args) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/bard/cli/hurt.rb', line 5

def hurt *args
  (1..).each do |count|
    puts "Running attempt #{count}"
    system *args
    unless $?.success?
      puts "Ran #{count-1} times before failing"
      break
    end
  end
end