modular_tree 0.10.0 → 0.11.0

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
  SHA256:
3
- metadata.gz: ae3499e0ea36c7f7dd44068616ec8dd566e43be82c0e728dae86da829b085d7f
4
- data.tar.gz: f1c35152a0b97dad0b50e85cf2061baf9bad2fed42ca4bc2bb8df3b000b81468
3
+ metadata.gz: c0947ea53f44cfdfdf8c615c26217fc7bfd86b9fae98f6c234519ace576f911d
4
+ data.tar.gz: 6dc9685845668b34db4724828f777e80d1e808557c1e8b63988f23a82fdccccf
5
5
  SHA512:
6
- metadata.gz: 71c8a99e260fe03d2453371b0afe9bc79c22234fe74a79ddf61036affd1a3129c84597006c9b5648831f1b3f469f79f26f73fd1c6263c277cee3bcea91905480
7
- data.tar.gz: cb5feecaf6a795c91011fbafca901bb1fea9814e9b1283407b623052d9b33b801d1935d9e5594115154384ab2f49763dd5bd672dba1a3b490d800b4a9129bf3b
6
+ metadata.gz: e18eeb61df2ec711d51501175409ce1b085dc86d01c65ae3863f9abf4c72ff2e051dfc070541652acfdc6515859a2b7e0cf9c11ea665c5d1f9146c83ad881701
7
+ data.tar.gz: b7f8dfbd482c7c64dd8f52f52d17d2ad2b4e82ee5e0604adbc790aa576ade55c0e26456df207938656ef5314fd4601809797669c11a488ba89d861e020bee905
@@ -53,6 +53,12 @@ module Tree
53
53
  include ParentImplementation
54
54
  end
55
55
 
56
+ module InternalRootImplementation
57
+ include RootProperty
58
+ include InternalParentImplementation
59
+ def root = @root ||= parent&.root || self
60
+ end
61
+
56
62
  module ChildrenImplementation
57
63
  include ChildrenProperty
58
64
  include BranchesProperty
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tree
4
- VERSION = "0.10.0"
4
+ VERSION = "0.11.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modular_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-18 00:00:00.000000000 Z
11
+ date: 2022-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: constrain