shrug 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shrug.rb +7 -2
- data/lib/shrug/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: d28432e40c002d29d7fbdb086890576655daaadf
|
4
|
+
data.tar.gz: 8b3ce501518487412baa3acfe1f015eecdb6872f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0c85b397f0e574e78c8768468463cc214505b032cef5e4dbc532a8e8ab46f5dbb59faf94d27d65eb2635c2d578d18ddedb6e30cabb8e15d0f7932681305b5b
|
7
|
+
data.tar.gz: 04e164c6a4e2d42d367dc1233cad40ceaaacb269e532b301195c810bfc464b018969121dd506826e825d0464a459e41e65a065b56f370182241b04e51acc058b
|
data/lib/shrug.rb
CHANGED
@@ -8,9 +8,14 @@ module Shrug
|
|
8
8
|
return if WHITELIST.include?(method.to_s)
|
9
9
|
|
10
10
|
STDERR.puts("¯\\_(ツ)_/¯ (`#{method.to_s}' undefined)")
|
11
|
-
Robustly.report_exception(NoMethodError.new("undefined method `#{method}' for nil:NilClass (¯\\_(ツ)_/¯)"))
|
12
11
|
|
13
|
-
|
12
|
+
safely default: self do
|
13
|
+
raise NoMethodError.new("undefined method `#{method}' for nil:NilClass (¯\\_(ツ)_/¯)")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def respond_to_missing?(method, *args, &block)
|
18
|
+
!WHITELIST.include?(method.to_s)
|
14
19
|
end
|
15
20
|
end
|
16
21
|
|
data/lib/shrug/version.rb
CHANGED