rm-extensions 0.5.0 → 0.5.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: 5508660ca09f24056f99da66f92638543dd64bbb
4
- data.tar.gz: 4d03e2678ca57e1906faf277637ede4029d677b1
3
+ metadata.gz: 84dc10ae9942e20efb063bfbab3f7fb0a1651524
4
+ data.tar.gz: ef538c09c7a85d1c36544c2336c8e2da9003353b
5
5
  SHA512:
6
- metadata.gz: 36069726b1441e036f165666810d61e9a6c1e1df5c8ac16e1ca9ead8d00ec8a7beca81f3d5b2ee22201654155e82842ed91ebb4b1ce8892ca67d386f621f44fa
7
- data.tar.gz: 264354fcf310ccca5b4b7f729b1a1f79fe3b90ea9145ebdf195c7fea8381def8619acfde5fad8a25be4f1c125b1e7093985b1eedb32a9f6de2236b9182e192f6
6
+ metadata.gz: 2df9a9c76852ed1adb84fe1e8a28f45746493f7e7a3113ae512e44cc024e1242f3225ec7d7193f028639dd577fe70d60d67c9320c68b6162156f3a4f43c42d29
7
+ data.tar.gz: b0db0adf1a9c91242ea1333a51183ebc397c4d1320b8b735fd6d3ea04a789ab1a6f4792ebc91b1c4a56512f20c3f9b62a19f8929bf9f55166e97bae05d4c4b92
@@ -4,20 +4,20 @@ module RMExtensions
4
4
 
5
5
  module Accessors
6
6
 
7
- # creates an +attr_accessor+ like behavior, but the objects are
8
- # stored with a WeakRef.
9
- # does not conform to KVO like attr_accessor does.
10
- def rmext_weak_attr_accessor(*attrs)
11
- attrs.each do |attr|
12
- define_method(attr) do
13
- instance_variable_get("@#{attr}")
14
- end
15
- define_method("#{attr}=") do |val|
16
- instance_variable_set("@#{attr}", WeakRef.new(val))
17
- val
18
- end
19
- end
20
- end
7
+ # # creates an +attr_accessor+ like behavior, but the objects are
8
+ # # stored with a WeakRef.
9
+ # # does not conform to KVO like attr_accessor does.
10
+ # def rmext_weak_attr_accessor(*attrs)
11
+ # attrs.each do |attr|
12
+ # define_method(attr) do
13
+ # instance_variable_get("@#{attr}")
14
+ # end
15
+ # define_method("#{attr}=") do |val|
16
+ # instance_variable_set("@#{attr}", val.nil? ? nil : WeakRef.new(val))
17
+ # val
18
+ # end
19
+ # end
20
+ # end
21
21
 
22
22
  # creates an +attr_accessor+ like behavior, but the objects are
23
23
  # stored in an NSMapTable with strong keys (the attrs) and
@@ -38,6 +38,7 @@ module RMExtensions
38
38
  end
39
39
  end
40
40
  end
41
+ alias_method :rmext_weak_attr_accessor, :rmext_zeroing_weak_attr_accessor
41
42
 
42
43
  end
43
44
 
@@ -1,3 +1,3 @@
1
1
  module RMExtensions
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
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.0
4
+ version: 0.5.1
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-01-28 00:00:00.000000000 Z
11
+ date: 2014-02-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Extensions and helpers for dealing with various areas of rubymotion
14
14
  email: