pinball 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pinball/class.rb +5 -1
- data/lib/pinball/version.rb +1 -1
- data/spec/lib/pinball/class_spec.rb +0 -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: 8694c6a9754e8563f40aac11464ad2e15cb2c95b
|
4
|
+
data.tar.gz: d8a1ca2d30a0e5207fbdb93caff25b3993f90ec2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a3d8797145fb2372a09936cda30244c5a6a9ae09a424c8e4cb617fd074ffc58e0121eeaed6946cdc15094557777ba4ac63174ffa7fca0d9a2d513aeecf152ae
|
7
|
+
data.tar.gz: f0ef29a9ff9fb698c52be476178e23f6ace4b26b0afb64ab0b1e257d1e6b9d19c5500855bad79a3dd9d6cb21282518a1baa31a99acef5d45e5e91dcd9a5cc194
|
data/lib/pinball/class.rb
CHANGED
@@ -21,10 +21,14 @@ class Class
|
|
21
21
|
self.extend Pinball
|
22
22
|
self.send(:include, Pinball::Methods)
|
23
23
|
|
24
|
-
self.send(:define_singleton_method, :
|
24
|
+
self.send(:define_singleton_method, :inherited_with_pinball) do |child|
|
25
|
+
inherited_without_pinball(child) if respond_to?(:inherited_without_pinball)
|
25
26
|
child.instance_variable_set :@dependencies, self.dependencies
|
26
27
|
child.check_pinball
|
27
28
|
end
|
29
|
+
|
30
|
+
self.send(:define_singleton_method, :inherited_without_pinball, self.method(:inherited)) if self.respond_to?(:inherited)
|
31
|
+
self.send(:define_singleton_method, :inherited, self.method(:inherited_with_pinball))
|
28
32
|
end
|
29
33
|
end
|
30
34
|
end
|
data/lib/pinball/version.rb
CHANGED