Class: Object

Inherits:
BasicObject
Defined in:
lib/chuck-norris.rb

Instance Method Summary collapse

Instance Method Details

#raise_with_chuck_norris(*args) ⇒ Object Also known as: raise



2
3
4
5
6
7
8
9
10
11
# File 'lib/chuck-norris.rb', line 2

def raise_with_chuck_norris(*args)
  exception = args.first
  # Only Rubinius catches SystemExit at the end. Ignore it
  unless exception.is_a?(SystemExit)
    $stdout.puts("Chuck Norris has thrown #{args.first} and has given quarter to your app")
    say "Boom"
  end
  
  raise_without_chuck_norris(*args)
end