relaton-render 0.4.1 → 0.4.2

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
  SHA256:
3
- metadata.gz: 3e893e8e3387625e3c0fa4d92117bf0580df3eda1fd24b7893627e97a70aa6e5
4
- data.tar.gz: 0741eec09057676c8198d3572ed5c441fe3ae89669bf0120a37f8ab357f746e9
3
+ metadata.gz: c21e6af4c8c19084d12c883fcc12ec4828965563d84eefa9ad3776fbd4997bf6
4
+ data.tar.gz: df7f7dbbc98ac5de46e904cc572d9ed131921ec7b6418e3080e5115a69ab0647
5
5
  SHA512:
6
- metadata.gz: 5f504a73a3b3ec8e5aeb2bea0557daf0f66f552af05277fdc6b52e8bf905bd629fdc06b6a02c8a8d8ab5a19f4be6aff10135c0e3b24feeb5a9b18c5d19c952a5
7
- data.tar.gz: 87add59c85c84d861650b95e2d6ae2954dbd63ba4013a199493f2e9417b727de13955b4fbf2a5b20e3a00405dd0ae2c4e78d3cc1e8496f1d8ad2cd6d5c4188b4
6
+ metadata.gz: 2d0a91b6196e46b51e2aa88dd923608b885ecc369e63e56bc16fd90d5458f3300c8017d73f0524ecb32b7d811d391be0da4778649559df8a0f540b85150baf4e
7
+ data.tar.gz: aa14c96d47a1b354c26dd4b99df07c334dd9404f8faf04bd7686d3071b85cc0d0769a81976d8ae83846d5334a4c36fa02a3ef0e5d66f152a80dc6ba66d5b960f
@@ -61,19 +61,25 @@ module Relaton
61
61
  end
62
62
 
63
63
  def suffix_date(ret)
64
- ret.each_value do |v|
65
- v.each_value do |v1|
66
- next if v1.size < 2
64
+ ret.each do |k, v|
65
+ v.each do |k1, v1|
66
+ next if v1.reject { |b| b[:date].nil? }.size < 2
67
67
 
68
- v1.each_with_index do |b, i|
69
- b[:date] += ("a".ord + i).chr.to_s
70
- b[:data_liquid][:date] = b[:date]
71
- end
68
+ suffix_date1(ret, k, k1)
72
69
  end
73
70
  end
74
71
  ret
75
72
  end
76
73
 
74
+ def suffix_date1(ret, key1, key2)
75
+ ret[key1][key2].each_with_index do |b, i|
76
+ next if b[:date].nil?
77
+
78
+ b[:date] += ("a".ord + i).chr.to_s
79
+ b[:data_liquid][:date] = b[:date]
80
+ end
81
+ end
82
+
77
83
  def to_hash(ret)
78
84
  ret.each_with_object({}) do |(_k, v), m|
79
85
  v.each do |_k1, v1|
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Render
3
- VERSION = "0.4.1".freeze
3
+ VERSION = "0.4.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-render
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-10 00:00:00.000000000 Z
11
+ date: 2022-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler