xamarin-automators-calabash 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xamarin-automators-calabash.rb +7 -0
- 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: ea85b7f08fecb201a92e569fcea0c37f25d02414
|
4
|
+
data.tar.gz: 3bb42a67e5be62b6541130487c335f0fd0cc88e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb68626383d9a401cb6f1d89c35dee5a6f3fb079e89dbb68c8a832738007192ecf3af8cbed81991ecc57cd23a98d1ecaf39338e17eb710e1149d7c5bac37a3c9
|
7
|
+
data.tar.gz: 9243ec6168df20fddd94dc169c2c31de345cf1126336a9e4308c5f317aa41f774cfab556140cf5f27cf18ea3b67bda0aeade7e2c50376ec6a3629618afc008dc
|
@@ -1,7 +1,9 @@
|
|
1
1
|
require 'awesome_print'
|
2
2
|
|
3
3
|
def print_tree(show_class=false)
|
4
|
+
@count = 1
|
4
5
|
print_tree_recurse("child * parent * index:0", (query "* index:0").first, 0, show_class)
|
6
|
+
return @count
|
5
7
|
end
|
6
8
|
|
7
9
|
def print_tree_recurse(query, node, indent, show_class)
|
@@ -16,10 +18,15 @@ def print_tree_recurse(query, node, indent, show_class)
|
|
16
18
|
print "\n"
|
17
19
|
children = query "#{query} child *"
|
18
20
|
(children.size).times do |i|
|
21
|
+
@count += 1
|
19
22
|
print_tree_recurse("#{query} child * index:#{i}", children[i], indent+1, show_class)
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
26
|
+
def print_tree_partial(query, show_class=false)
|
27
|
+
print_tree_recurse("#{query} index:0", (query "#{query} index:0").first, 0, show_class)
|
28
|
+
end
|
29
|
+
|
23
30
|
def colorize(text, color_code)
|
24
31
|
"\e[#{color_code}m#{text}\e[0m"
|
25
32
|
end
|