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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0525db10e7d9bce5ff3269a13fdef62dad0bf78
4
- data.tar.gz: 062eb82bf96f6bbdb4fa161305cf2649c6d1433d
3
+ metadata.gz: 125e67594dab68555662536ef218e3a019bc8d0e
4
+ data.tar.gz: 3a58bbee37d83dbcaa2f1829ba67026645c18662
5
5
  SHA512:
6
- metadata.gz: 3072c990ef4a95fc8c80d44548de93b69b7ddeb81e1de604249b02dfad7020c88cc8eca58f606b86c4bc4f71e682d58e31fa93f67f154ffb01d63a2776f7f4d4
7
- data.tar.gz: 332d625a49002997180a3421a49ef382b4ec2597e82e6ff8d2b86f87eb37a55caabcaf502c5d60c003764090f5a41b6fef550591e8580724e7cfe90ef8eb1818
6
+ metadata.gz: be30e87061d245a9015dbfa04f0108d587b6ab56db76ac2f4e98d7866fc1ef0163374417bfd7d98599ff6a3f26169afafc06a0afa44ba5888018313477c1ccdd
7
+ data.tar.gz: e8ad87e9ab529d2aa598bf30d2344f6810e4e9151a53358a86afc77f80777db97d66490c91ec45369e4b7c58b7ce762771f2f00a97f12465a71664174750271e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hcast (0.2.0)
4
+ hcast (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module HCast
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -1,6 +1,5 @@
1
1
  require 'rubygems'
2
2
  require 'bundler/setup'
3
- require 'debugger'
4
3
  require 'hcast'
5
4
 
6
5
  RSpec.configure do |config|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hcast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert Gazizov