shrug 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shrug.rb +7 -2
  3. data/lib/shrug/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06c321903e8cc723f7ed09bd5cf3fab2ed4a64af
4
- data.tar.gz: 488f0bef5e788b487b828ae949593484c5fb075d
3
+ metadata.gz: d28432e40c002d29d7fbdb086890576655daaadf
4
+ data.tar.gz: 8b3ce501518487412baa3acfe1f015eecdb6872f
5
5
  SHA512:
6
- metadata.gz: 3d87376bd351701843b044b1ece26c4fe629ce5f19a61f820dd8448040e7ec0bd2dafa43ba1a77bfe5edde1e19815cfc7d22bae5393e12258fdc4197c3c89da4
7
- data.tar.gz: 761777a20068c80eb6b83cb33a5c017367bafd052b4f54d48de3ffe97a92469b699ac879090cbc413e0109328b078205af0dfd5a52b5b5ef97a80db036bca925
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
- self # magic happens here
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
@@ -1,3 +1,3 @@
1
1
  module Shrug
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shrug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Elser