ruby_patterns 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93decb1fff4f991e2f9a657db45b9566707e9752
4
- data.tar.gz: 2d1f952e86a01d1caf4be10b374ea29646ce46e8
3
+ metadata.gz: 5e8ad0e3e6d0a5203dc430bac388c6a5d689b1ae
4
+ data.tar.gz: fc9e8dfbb9a49f91bfb8df115488b268adab9b79
5
5
  SHA512:
6
- metadata.gz: 2a11bca27ee0c976c0f8b59daf7e13cd995f62e61e9d93b9a6659430d7f96c9e85446d52fc46683833d82f2696d3172cd8c9d0779ae574ea8e54b5afddfddfad
7
- data.tar.gz: 4ade69badd8c3d419267fa42481fc4435115aad115f4038f89f9f87c19810433acbf6b1c28236b0deeb4b8309adc88f086cfbbbefd64496cb900f68a1d769f40
6
+ metadata.gz: 000d8d909362f45246c67e86ae2f672fa07a9af431c299de93bd316f7e90b353e3198cadec0aff3614513e30fed962be045dfe6c8cb077122c2c7bcd40c185f4
7
+ data.tar.gz: d86def70c4d15b82ff9edac7a3cb1f8d3949ec525e4c91e9c56a8fd4d67737205f4e6aadf9d3e33e405bb6c8d234b5e2a3ecd50be81d58af97c2e6c95870a8cf
@@ -1,3 +1,3 @@
1
1
  module RubyPatterns
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -23,24 +23,22 @@ module RubyPatterns
23
23
  "#<#{self.class.name} key=#{__key.inspect} #{__state}>"
24
24
  end
25
25
 
26
+ def __load
27
+ raise NotImplementedError, "Subclasses must implement `__load`."
28
+ end
29
+
30
+ def __state
31
+ __real ? LOADED : GHOST
32
+ end
33
+
26
34
  protected
27
35
 
28
36
  def method_missing(name, *args, &block)
29
- if !__real
37
+ if __real.nil?
30
38
  __load
31
39
  end
32
40
  __real.send(name, *args, &block)
33
41
  end
34
42
 
35
- private
36
-
37
- def __load
38
- raise NotImplementedError
39
- end
40
-
41
- def __state
42
- __real ? LOADED : GHOST
43
- end
44
-
45
43
  end
46
44
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_patterns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chandek-Stark