ruby_motion_query 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/motion/ruby_motion_query/tags.rb +20 -0
- data/motion/ruby_motion_query/traverse.rb +1 -1
- data/motion/ruby_motion_query/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b355a45a7110338fc6c02889a66d384c1734a33a
|
4
|
+
data.tar.gz: fc38661d7c12c3e2f87d416dae6033a50c37bd84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f53052d866be68dd0477ef021b73ed699d8e17e22a644376f2f54de0f596906bfafad95ce426b94e473182ee52cf65017ede0dde8d4adeeb22d601e9e2f9a28a
|
7
|
+
data.tar.gz: 760ac10daad4c5931d39c7e5723a86966cd952408f97c5a643989e16e7052bbad680fc8e6e95618e355767a192fe31da9ee8440401d9a57ba55d875c5b252cd7
|
@@ -49,6 +49,26 @@ module RubyMotionQuery
|
|
49
49
|
false # tag doesn't exist if we got here
|
50
50
|
end
|
51
51
|
|
52
|
+
def tags(key=nil)
|
53
|
+
tags = {}
|
54
|
+
selected.each do |view|
|
55
|
+
view.rmq_data.tags.each do |tag, data|
|
56
|
+
tags[tag] ||= []
|
57
|
+
tags[tag] << data
|
58
|
+
end
|
59
|
+
end
|
60
|
+
tags = tags.inject({}) do |hash,(k,v)|
|
61
|
+
hash[k] = v.length == 1 ? v.first : v
|
62
|
+
hash
|
63
|
+
end
|
64
|
+
|
65
|
+
if key
|
66
|
+
tags[key]
|
67
|
+
else
|
68
|
+
tags
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
52
72
|
# See /motion/data.rb for the rest of the tag stuff
|
53
73
|
|
54
74
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_motion_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todd Werth
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bacon
|