Sha256: 1afbf1967311d5842da615444039fb07a38295486b63780e034b9c36f43d032b

Contents?: true

Size: 261 Bytes

Versions: 3

Compression:

Stored size: 261 Bytes

Contents

require 'lib/hammertime'

$broken = true

def faulty_method
  raise "Oh no!" if $broken
end

3.times do |n|
  puts "Attempt (#{n+1}/3)"
  begin
    faulty_method
    puts "No error raised"
  rescue => error
    puts "Error raised: #{error.inspect}"
  end
end


Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hammertime-0.0.3 example.rb
hammertime-0.0.2 example.rb
hammertime-0.0.1 example.rb