rm-extensions 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/motion/events.rb +6 -6
- data/lib/rm-extensions/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: 05ba5917dfbc163f149963986284b5a41f94bf63
|
4
|
+
data.tar.gz: 46a98c4ca59698a8c21cfd262b79b2488ed90948
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61e7dd9fc7b999b92ae5332bf57104ca72f1a797074177efca464da8d5b35afddfcac508a1e0c9dbed011d650f6292b5e2f70c98c7bfcf9d2a1e67f9c91eaa1d
|
7
|
+
data.tar.gz: ca584471c4e3c82e18828ad76159d8e5aae7ee0d78296a0b3aa7f57c2ff105d0cc1657b4fd23268ee8a3cbd01d388003e6702e697454ea2fe0c04c7676cf51a4
|
data/lib/motion/events.rb
CHANGED
@@ -171,12 +171,7 @@ module RMExtensions
|
|
171
171
|
def off(event=nil, context=nil, &block)
|
172
172
|
if event.is_a?(String) || event.is_a?(Symbol)
|
173
173
|
event = event.to_s
|
174
|
-
if
|
175
|
-
# remove all handlers for the given event in the given context
|
176
|
-
if context_events = @events.objectForKey(context)
|
177
|
-
context_events.delete(event)
|
178
|
-
end
|
179
|
-
elsif block
|
174
|
+
if block
|
180
175
|
# remove the one block for the event in the blocks #owner
|
181
176
|
context = block.owner
|
182
177
|
if context_events = @events.objectForKey(context)
|
@@ -184,6 +179,11 @@ module RMExtensions
|
|
184
179
|
context_event_blocks.delete block
|
185
180
|
end
|
186
181
|
end
|
182
|
+
elsif context
|
183
|
+
# remove all handlers for the given event in the given context
|
184
|
+
if context_events = @events.objectForKey(context)
|
185
|
+
context_events.delete(event)
|
186
|
+
end
|
187
187
|
else
|
188
188
|
# remove all handlers for the event in all contexts known
|
189
189
|
keyEnumerator = @events.keyEnumerator
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rm-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Noon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Extensions and helpers for dealing with various areas of rubymotion
|
14
14
|
email:
|