tree_support 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.org +6 -5
- data/lib/tree_support/version.rb +1 -1
- 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: 1d42846d7b222401aa8cb748f56c6cc2844cb68c
|
4
|
+
data.tar.gz: 49e88e6f20cd13b54d984ea006c600dccac477a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b2f24e9a380597643745b27874649fcd68537d92797ae028b9020313611761eda6ed7589a44f7b5cb5a47f88de00b91d03c1bf56d9df99bf0a3de6785a93da
|
7
|
+
data.tar.gz: be086b2d96e0135aae4f0eb290b4a2c435626c0eddd686ea6ca57337451631d8b0ab474807ce18646844cb448504fbfa2762cb461571fe2989bd38afc20b386c
|
data/README.org
CHANGED
@@ -19,7 +19,7 @@ $ bundle install
|
|
19
19
|
|
20
20
|
** How to use in one line
|
21
21
|
|
22
|
-
Just pass the object that has the parent, children method to TreeSupport.tree
|
22
|
+
Just pass the object that has the parent, children method to =TreeSupport.tree=
|
23
23
|
|
24
24
|
#+BEGIN_SRC ruby
|
25
25
|
require "tree_support"
|
@@ -128,7 +128,7 @@ puts TreeSupport.tree(root)
|
|
128
128
|
|
129
129
|
*** Troublesome writing TreeSupport.tree
|
130
130
|
|
131
|
-
|
131
|
+
=include TreeSupport::Stringify=
|
132
132
|
|
133
133
|
#+BEGIN_SRC ruby
|
134
134
|
Node.include(TreeSupport::Stringify)
|
@@ -189,16 +189,17 @@ puts TreeSupport.tree(root) { |node| node.object_id }
|
|
189
189
|
|
190
190
|
The following methods become available in include of =TreeSupport::Treeable=
|
191
191
|
|
192
|
+
- root
|
193
|
+
- root?
|
194
|
+
- leaf?
|
192
195
|
- each
|
193
196
|
- each_node
|
194
197
|
- descendants
|
195
198
|
- self_and_descendants
|
196
199
|
- ancestors
|
197
|
-
-
|
200
|
+
- self_and_ancestors
|
198
201
|
- siblings
|
199
202
|
- self_and_siblings
|
200
|
-
- root?
|
201
|
-
- leaf?
|
202
203
|
|
203
204
|
*** How to convert to Gviz object?
|
204
205
|
|
data/lib/tree_support/version.rb
CHANGED