abort_if 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/abort_if.rb +4 -1
- data/lib/abort_if/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ff346f835eaf8be62228af05ff85eb2807864b9
|
4
|
+
data.tar.gz: 3af9f14d527dd63f7248507be6361f81b50b8adf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d8ab76f0e2a9d0bb919b04cfc20c9e5f12e4ab45f04acd6500f93bc2af04a038468510cb1bf1b9b353a99ee71d8fba6c40fff8c7c90d36cf4b88cbd8aca8c16
|
7
|
+
data.tar.gz: fe49cb8b166cf662997aba7d7a1f466dc7462de7203054cea3d4bc89a95868668de89e74ac4552dc9c48c736a4f9a77f6ccad211ed813c0d0151bfac83ad3d81
|
data/lib/abort_if.rb
CHANGED
@@ -51,10 +51,13 @@ module AbortIf
|
|
51
51
|
#
|
52
52
|
# @note The abort_if style methods don't interpolate arguments to
|
53
53
|
# msg as the Assert module methods do
|
54
|
+
#
|
55
|
+
# @note When rescuing AbortIf::Exit, the msg will be passed if you
|
56
|
+
# want to display it in the rescue block
|
54
57
|
def abort_if test, msg="Fatal error"
|
55
58
|
if test
|
56
59
|
logger.fatal msg
|
57
|
-
raise Exit
|
60
|
+
raise Exit, msg
|
58
61
|
end
|
59
62
|
end
|
60
63
|
|
data/lib/abort_if/version.rb
CHANGED