through_hierarchy 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: 24802dbaa712d4bce228409d6559bd95e8d07088
4
- data.tar.gz: 94bc36b57d75022bcd256dae8edfd4710652aedf
3
+ metadata.gz: 74f01013ac5a0df1c24c2ca7202d6de47936dcff
4
+ data.tar.gz: 1c2e2a79defb580b6449e90535f6683725996497
5
5
  SHA512:
6
- metadata.gz: af92986a50caae9db2e72c5fd5e2999ed13130faef98e66fe63c97ae6281673b095a82e2a3012909bb94beabe677cd89e7e6aa518272a82554efb5fa9f77c312
7
- data.tar.gz: efac0a679e68aae89833613b84cd1b4f636e8de80c1ef9546dc7c87386f1bd0d64516eea522936709289ea73737abe45c206788ee883c372402956ea78c22d6e
6
+ metadata.gz: 5026fbd509012ffd95864c8732fe08ca37dc398ea8ef36688f7d0cd76cdd42082aaae32b8022a02ae9725d5b98482cbacd22ef8ce150e3c8cfc4f561bfae1416
7
+ data.tar.gz: 8b246b81fedf869e249b66dc9074c0bb922264bd840914c36b27f7a3209c7c4868330d9f0b10c5c68c86f91d5dc1fc61fb0c8c83f0d12aa5e792b5d62ca3a0ca
@@ -14,6 +14,12 @@ module ThroughHierarchy
14
14
  end
15
15
 
16
16
  module ClassMethods
17
+ # deep_dup these class attributes on inheritance so we can safely use in-place modifiers
18
+ def inherited(child)
19
+ child.hierarchical_associations = self.hierarchical_associations.deep_dup
20
+ super
21
+ end
22
+
17
23
  def through_hierarchy(members, &blk)
18
24
  Hierarchy.new(self, members).instance_eval(&blk)
19
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: through_hierarchy
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
  - Andrew Schwartz