rails_metadata 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_metadata/version.rb +1 -1
- data/lib/rails_metadata.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c319b4411d2b80846de558ab35065e8f320441c9
|
4
|
+
data.tar.gz: b863bac4263dbfa41e0d6f151b39a5b41792ea4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8945946fdb36fe7d6c95927294e9a257a6d746d6e41d473a6cf5515e8b95ccd27323d593da4ce5c7a33e85e7af724568b01149ce58c83fb1ad3c99c2ddbba85
|
7
|
+
data.tar.gz: 0d4492f872fc0159a85a83af8f510bfe2af99a864636b3557de81a502344730429968b5007c30719632dc48e3d5af296f9cb6942d4f9f7dd3efba06d107c3c0a
|
data/lib/rails_metadata.rb
CHANGED
@@ -36,7 +36,11 @@ module RailsMetadata
|
|
36
36
|
end
|
37
37
|
define_method(name.to_s + '=') do |val|
|
38
38
|
self.metadata = {} unless self.metadata.present?
|
39
|
-
|
39
|
+
if val.present?
|
40
|
+
self.metadata.merge!(name => typecast.call(val))
|
41
|
+
else
|
42
|
+
self.metadata.delete(name)
|
43
|
+
end
|
40
44
|
end
|
41
45
|
end
|
42
46
|
end
|