rooted_tree 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rooted_tree/tree.rb +14 -0
- data/lib/rooted_tree/version.rb +1 -1
- data/rooted_tree.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3f5ccd99747a243d238569e0701d73798e94c0d
|
4
|
+
data.tar.gz: 9fe0b64c62ae48112271a9c757112f683f3bdecc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 281c52f594074e7ed2c2b8d9b85fbd405615f8d35b71f999aebdf55a9cd35cc51b7658c3f3491fe52a762e712dcde4b8955de99fe85962b6f22850aa87d8add6
|
7
|
+
data.tar.gz: 7e1a800d3a03349fe3364f722a6826afbbad0bafb205ec6dca44a19f8828c987daa9d822b33b2d81f565ab8e5e5648b50baa5899aa6fd1bcdf0ca603b92d9de9
|
data/lib/rooted_tree/tree.rb
CHANGED
@@ -1,7 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Tree
|
4
|
+
#
|
5
|
+
# Include this module in any object that responds to #root with a Node
|
6
|
+
# structure. The mixin provides some methods for describing the tree as well as
|
7
|
+
# direct access to some of the iteration methods in Node.
|
8
|
+
|
3
9
|
module RootedTree
|
4
10
|
module Tree
|
11
|
+
|
12
|
+
# Freezes the node structure that is part of the tree.
|
13
|
+
|
14
|
+
def freeze
|
15
|
+
root.freeze
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
5
19
|
# Returns the maximum degree (highest number of children) in the tree.
|
6
20
|
|
7
21
|
def degree
|
data/lib/rooted_tree/version.rb
CHANGED
data/rooted_tree.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["seb.lindberg@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{A basic implementation of a tree data structure.}
|
13
|
-
spec.description = %q{This gem implements a rooted, ordered tree, with a focus on easy iteration over nodes and access to basic tree
|
13
|
+
spec.description = %q{This gem implements a rooted, ordered tree, with a focus on easy iteration over nodes and access to basic tree properties.}
|
14
14
|
spec.homepage = "https://github.com/seblindberg/ruby-rooted_tree"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rooted_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Lindberg
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.8'
|
69
69
|
description: This gem implements a rooted, ordered tree, with a focus on easy iteration
|
70
|
-
over nodes and access to basic tree
|
70
|
+
over nodes and access to basic tree properties.
|
71
71
|
email:
|
72
72
|
- seb.lindberg@gmail.com
|
73
73
|
executables: []
|