field_mapper 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/field_mapper/standard/plat.rb +4 -1
- data/lib/field_mapper/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: ce39c6b7c34a6d374ac954c8b363b4b8836189a9
|
4
|
+
data.tar.gz: c095ddb362a9e9a58c563bb6f5b2560d7ccc47b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3534a25c5d9b804d4ee358e0268ee923f62611134fe672a76053bb211e889f0f5ecadef9147595219d658ea80d9d6380caeafdd0e8d5df984e02e5cec6e8f787
|
7
|
+
data.tar.gz: a7fd0752dbb928571392bd9229416f26269340322041ca2b29a38ea64fdb88aa18ae59ecf4473a230046dd83579b897aae4983e491707db7594800d71978a833
|
@@ -100,7 +100,7 @@ module FieldMapper
|
|
100
100
|
def []=(field_name, value)
|
101
101
|
field = self.class.find_field(field_name)
|
102
102
|
raise FieldNotDefined if field.nil?
|
103
|
-
|
103
|
+
assign_param field_name, field.cast(value)
|
104
104
|
end
|
105
105
|
|
106
106
|
def to_hash(flatten: false, history: {}, include_meta: true, placeholders: false)
|
@@ -245,6 +245,9 @@ module FieldMapper
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def assign_param(name, value)
|
248
|
+
if defined? before_assign_param
|
249
|
+
value = before_assign_param(name, value)
|
250
|
+
end
|
248
251
|
instance_variable_set "@#{attr_name(name)}", value
|
249
252
|
end
|
250
253
|
|
data/lib/field_mapper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: field_mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Hopkins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|