shrug 0.0.2 → 0.0.3

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/version.rb +1 -1
  3. data/lib/shrug.rb +5 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32c441c4f28d32e9581e4be75156bfa3307502b5
4
- data.tar.gz: 1ed529f04ce726a4c47a5b62edef1a46911306e6
3
+ metadata.gz: 06c321903e8cc723f7ed09bd5cf3fab2ed4a64af
4
+ data.tar.gz: 488f0bef5e788b487b828ae949593484c5fb075d
5
5
  SHA512:
6
- metadata.gz: d8ad073105dc74b10af18672c82f9024e087707fdb56348dac3164419c68c7fe480b744ce2cded61764e09e5a71229ec562e741738b765bddbdba94efc2c3171
7
- data.tar.gz: 4d59617a034f672fb225e673d3df10efb75cd80f2e74af9c757a0d01fc848cfb2e04e56f8ed1a9e38075036057d621125be1776e4b496717b8533ba1c16c2941
6
+ metadata.gz: 3d87376bd351701843b044b1ece26c4fe629ce5f19a61f820dd8448040e7ec0bd2dafa43ba1a77bfe5edde1e19815cfc7d22bae5393e12258fdc4197c3c89da4
7
+ data.tar.gz: 761777a20068c80eb6b83cb33a5c017367bafd052b4f54d48de3ffe97a92469b699ac879090cbc413e0109328b078205af0dfd5a52b5b5ef97a80db036bca925
data/lib/shrug/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Shrug
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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
- STDERR.puts('¯\_(ツ)_/¯')
7
- STDERR.puts method
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
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Elser