shrug 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shrug/version.rb +1 -1
- data/lib/shrug.rb +5 -2
- 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: 06c321903e8cc723f7ed09bd5cf3fab2ed4a64af
|
4
|
+
data.tar.gz: 488f0bef5e788b487b828ae949593484c5fb075d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d87376bd351701843b044b1ece26c4fe629ce5f19a61f820dd8448040e7ec0bd2dafa43ba1a77bfe5edde1e19815cfc7d22bae5393e12258fdc4197c3c89da4
|
7
|
+
data.tar.gz: 761777a20068c80eb6b83cb33a5c017367bafd052b4f54d48de3ffe97a92469b699ac879090cbc413e0109328b078205af0dfd5a52b5b5ef97a80db036bca925
|
data/lib/shrug/version.rb
CHANGED
data/lib/shrug.rb
CHANGED
@@ -2,9 +2,12 @@ require "robustly"
|
|
2
2
|
require "shrug/version"
|
3
3
|
|
4
4
|
module Shrug
|
5
|
+
WHITELIST = %w(to_ary constantize to_str)
|
6
|
+
|
5
7
|
def method_missing(method, *args, &block)
|
6
|
-
|
7
|
-
|
8
|
+
return if WHITELIST.include?(method.to_s)
|
9
|
+
|
10
|
+
STDERR.puts("¯\\_(ツ)_/¯ (`#{method.to_s}' undefined)")
|
8
11
|
Robustly.report_exception(NoMethodError.new("undefined method `#{method}' for nil:NilClass (¯\\_(ツ)_/¯)"))
|
9
12
|
|
10
13
|
self # magic happens here
|