hcast 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/hcast/attributes_caster.rb +3 -3
- data/lib/hcast/version.rb +1 -1
- data/spec/spec_helper.rb +0 -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: 125e67594dab68555662536ef218e3a019bc8d0e
|
4
|
+
data.tar.gz: 3a58bbee37d83dbcaa2f1829ba67026645c18662
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be30e87061d245a9015dbfa04f0108d587b6ab56db76ac2f4e98d7866fc1ef0163374417bfd7d98599ff6a3f26169afafc06a0afa44ba5888018313477c1ccdd
|
7
|
+
data.tar.gz: e8ad87e9ab529d2aa598bf30d2344f6810e4e9151a53358a86afc77f80777db97d66490c91ec45369e4b7c58b7ce762771f2f00a97f12465a71664174750271e
|
data/Gemfile.lock
CHANGED
@@ -6,7 +6,7 @@ class HCast::AttributesCaster
|
|
6
6
|
@options = options
|
7
7
|
end
|
8
8
|
|
9
|
-
def cast(input_hash)
|
9
|
+
def cast(input_hash, options = {})
|
10
10
|
casted_hash = {}
|
11
11
|
|
12
12
|
hash_keys = get_keys(input_hash)
|
@@ -54,10 +54,10 @@ class HCast::AttributesCaster
|
|
54
54
|
def cast_children_with_caster(value, attribute, caster)
|
55
55
|
if attribute.caster == HCast::Casters::ArrayCaster
|
56
56
|
value.map do |val|
|
57
|
-
caster.cast(val)
|
57
|
+
caster.cast(val, options)
|
58
58
|
end
|
59
59
|
else
|
60
|
-
caster.cast(value)
|
60
|
+
caster.cast(value, options)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
data/lib/hcast/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED