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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84dc10ae9942e20efb063bfbab3f7fb0a1651524
4
- data.tar.gz: ef538c09c7a85d1c36544c2336c8e2da9003353b
3
+ metadata.gz: 05ba5917dfbc163f149963986284b5a41f94bf63
4
+ data.tar.gz: 46a98c4ca59698a8c21cfd262b79b2488ed90948
5
5
  SHA512:
6
- metadata.gz: 2df9a9c76852ed1adb84fe1e8a28f45746493f7e7a3113ae512e44cc024e1242f3225ec7d7193f028639dd577fe70d60d67c9320c68b6162156f3a4f43c42d29
7
- data.tar.gz: b0db0adf1a9c91242ea1333a51183ebc397c4d1320b8b735fd6d3ea04a789ab1a6f4792ebc91b1c4a56512f20c3f9b62a19f8929bf9f55166e97bae05d4c4b92
6
+ metadata.gz: 61e7dd9fc7b999b92ae5332bf57104ca72f1a797074177efca464da8d5b35afddfcac508a1e0c9dbed011d650f6292b5e2f70c98c7bfcf9d2a1e67f9c91eaa1d
7
+ data.tar.gz: ca584471c4e3c82e18828ad76159d8e5aae7ee0d78296a0b3aa7f57c2ff105d0cc1657b4fd23268ee8a3cbd01d388003e6702e697454ea2fe0c04c7676cf51a4
@@ -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 context
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
@@ -1,3 +1,3 @@
1
1
  module RMExtensions
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
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.1
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-06 00:00:00.000000000 Z
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: