class_kit 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/class_kit/helper.rb +4 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b81e243b2cf31eeaf9d1121ee76d9538662c5cb93e85a445492e35c4a40d8f81
4
- data.tar.gz: e1ac5e6d7cbed16a01205991e8c78e154b4f126f6c4dbbde3a620678466bacd5
3
+ metadata.gz: dafa96fa9b5a4e0d5b0c498dad30b76fc4f1e7385bffae89a2924bc36e3932c1
4
+ data.tar.gz: 94779e51e0a4f0730aa937bfb653497a565bd5833ef7479911a1ece12c713223
5
5
  SHA512:
6
- metadata.gz: 9023dda17de237312d0bd6968ce16360bb6eedb10eaf375d47fff0d7ec1206a760e2557557f2ae338536e2e667ee1242ed4aba3842e2bcd41bad142e455f3109
7
- data.tar.gz: ab848b6dbba992c5379a5fe935705f95737377e912e09a6e3a83e015e7f276fa51e098c133c147a5fc746bdb080488178780c46b8faffe00b309eb32a18096ae
6
+ metadata.gz: e6cac82b1b5f66f248a43ebb90813c274e2322dbe9813ad30ecda694ade0085fcedcc3aa1eb88ea69656a8c2863bd2ae2fb6fa7c0697321d458a6b8df203dfa4
7
+ data.tar.gz: fff56f5479de5a961f8c1e4768667c35ca13c9ba41e7d08fbe54dd7556c3ba01d03a21c3c5dfeef6d75496c3a1971160c0b873ed3dbec91210dd640727063fc9
@@ -29,11 +29,11 @@ module ClassKit
29
29
  value = object.public_send(attribute[:name])
30
30
  if value != nil
31
31
  hash[key] = if is_class_kit?(type)
32
- to_hash(value)
32
+ to_hash(value, use_alias)
33
33
  elsif type == Array
34
34
  value.map do |i|
35
35
  if is_class_kit?(i.class)
36
- to_hash(i)
36
+ to_hash(i, use_alias)
37
37
  else
38
38
  i
39
39
  end
@@ -62,14 +62,14 @@ module ClassKit
62
62
  next if hash[key].nil?
63
63
 
64
64
  value = if is_class_kit?(type)
65
- from_hash(hash: hash[key], klass: type)
65
+ from_hash(hash: hash[key], klass: type, use_alias: use_alias)
66
66
  elsif type == Array
67
67
  hash[key].map do |array_element|
68
68
  if attribute[:collection_type].nil?
69
69
  array_element
70
70
  else
71
71
  if is_class_kit?(attribute[:collection_type])
72
- from_hash(hash: array_element, klass: attribute[:collection_type])
72
+ from_hash(hash: array_element, klass: attribute[:collection_type], use_alias: use_alias)
73
73
  else
74
74
  @value_helper.parse(type: attribute[:collection_type], value: array_element)
75
75
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: class_kit
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
  - Sage One