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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2470da3bf0ecba5d45eaca32dbfa623c1f8b6d69
4
- data.tar.gz: bf6cfd75685027a85c41718fc6b2c1b845c3dc24
3
+ metadata.gz: b355a45a7110338fc6c02889a66d384c1734a33a
4
+ data.tar.gz: fc38661d7c12c3e2f87d416dae6033a50c37bd84
5
5
  SHA512:
6
- metadata.gz: 383304052b21e730b67132d4f17e9d5f2829897cc1c06851a5410a27456a7dcdd7c3b96a6f0c83a2581abc6ee5b5aaf8a550737f983a71d6f6fc5fb7585697a9
7
- data.tar.gz: fc9e2f23eed27d67fe809525fe6f809dd76bfcf0c314a13bab0e543f7a402aa14adfbcd2d718b3055a24bfd7e2fffee7368524f078f84cb6e186c76976d194cc
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
@@ -352,7 +352,7 @@ module RubyMotionQuery
352
352
  protected
353
353
 
354
354
  def closest_view(view, working_selectors)
355
- if nr = view.nextResponder
355
+ if (nr = view.nextResponder) && nr.is_a?(UIView)
356
356
  if match(nr, working_selectors)
357
357
  nr
358
358
  else
@@ -1,5 +1,5 @@
1
1
  module RubyMotionQuery
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
 
4
4
  class RMQ
5
5
  def version
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.0
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-10 00:00:00.000000000 Z
12
+ date: 2015-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bacon