modular_tree 0.13.0 → 0.14.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: 2cd6d39620d1c665267716d2089f1c498a1d0dd4aef5fc4b2cba175590d483a8
4
- data.tar.gz: 9f6f684e5433a04541761abb0a6379e18093c77fb2e3cd257ae7bba49ada19c1
3
+ metadata.gz: 7d23a4572f944f931e8aaa2c3cfd9ae8b1f6390dd0f544d323fa843c8a0af5bf
4
+ data.tar.gz: 82bba4b625cf35b0a0e3ae64ce9580c6cf210f8b4505e00809db10e21eaad465
5
5
  SHA512:
6
- metadata.gz: 72e405f8c4e5dcf4111c964301b482743d2ccec4b644c196fc64f15fe5393f713eb7f2e675f6c6f48a694764b4b055196e18a1a53145bfb6e9af920a6991325a
7
- data.tar.gz: 01da8646f20a98c4b4dc85ed7f79e67842a0c5f3836a28a6b1e171f723c861d154ba250bb70243027404daf108f61e09a07a4d2fbf800fcd4a3a3beb9c1d5bee
6
+ metadata.gz: a2c20a27dec745e60a543df2364c23503f2a07d4fbffe4a35f396a929b424b3211362dbffd5c7da5bd7e9672320e703d8eb65d12bb12265fe978f4a05f838bb6
7
+ data.tar.gz: 0702eae6a45e5c4cc3ca730f5bc55ac8afaba789fbdc4414979184531e90c079027cd0b2fc47521bf54a48c963f95a4927b0446447126b7f3de8cd31ca823585
@@ -25,6 +25,7 @@ module Tree
25
25
  def nodes = @pool.values
26
26
  def size = @pool.size
27
27
  def empty? = @pool.empty?
28
+ def empty! = @pool = {} # Useful in tests where a tree is created multiple times
28
29
  def [](uid) = @pool[uid]
29
30
  def []=(uid, node) @pool[uid] = node end
30
31
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tree
4
- VERSION = "0.13.0"
4
+ VERSION = "0.14.0"
5
5
  end
data/lib/modular_tree.rb CHANGED
@@ -115,7 +115,6 @@ module Tree
115
115
  # data.visit { ... }
116
116
  #
117
117
 
118
-
119
118
  # p Tree.ancestors
120
119
  # exit
121
120
 
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.13.0
4
+ version: 0.14.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: 2023-01-10 00:00:00.000000000 Z
11
+ date: 2023-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: constrain