goon_model_gen 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: 18a22dbea60f65d56af05ad1d8907ff6f694a1a374320c536452a004ea3cc026
4
- data.tar.gz: f13da07a5a4ecbb7ddb0fe75bdce89232f00110116bf47aac7d5d066a4b98d9e
3
+ metadata.gz: 9835d07159adef42e01da288ad53dd918cbb626896619aadf0891446f22ee2e7
4
+ data.tar.gz: a89f39e731615da2d590f7e048371ae9f481ca08d4e3f03aa0b7edd092d9884c
5
5
  SHA512:
6
- metadata.gz: '08d724abdb4eee97ab573d4ef3819328c3d35739a68e8b3117308077368cf0253e4815ca9aab77c2f1749502aee7fbe7c5432673b7e02a0e6695ecdb408c64b2'
7
- data.tar.gz: 7ae753e6522b99d7fee3ebfe5668abfa9b675cd4918cc24ad791038bf058f34be66f88e6ad5251be705103eda2fa696e084f6ee9cf5db4f60fc7b5309c349a07
6
+ metadata.gz: 3ba792bfd8a7f85c39d5954018256d7f7b6d2923c12067a974b3bdbab65cd63e0697061afaa5422f379b113fe3928aadcae9f16978b895e2b10d244a8b9d004b
7
+ data.tar.gz: b845c619e3cbeee5f406967c03da5d2f81c7f8ebcc91a4da87b23baf23e1aa64417034350c682cc2e0bb9635ca3707c1cd0a93dcffc066fe27930bd6dc888534
@@ -26,12 +26,17 @@ mappings.each do |mapping|
26
26
  <%-
27
27
  mfield = arg_fields.first
28
28
  arg = "m.#{mfield.name}"
29
- if mfield.struct? || mfield.slice?
30
- arg = "&#{arg}"
31
- raise "Struct field or Slice field requires func for mapping" if mapping.func.blank?
29
+ if mfield.type.name == rfield.type.name
30
+ right_side_main = arg
31
+ right_side = right_side_main
32
+ else
33
+ if mfield.struct? || mfield.slice?
34
+ raise "Struct field or Slice field requires func for mapping" if mapping.func.blank?
35
+ arg = "&#{arg}"
36
+ end
37
+ right_side_main = mapping.func ? "#{mapping.func}(#{arg})" : arg
38
+ right_side = (rfield.slice? ? '*' : '') + right_side_main
32
39
  end
33
- right_side_main = mapping.func ? "#{mapping.func}(#{arg})" : arg
34
- right_side = (rfield.slice? ? '*' : '') + right_side_main
35
40
  -%>
36
41
  <%- if rfield.value_ptr? -%>
37
42
  {
@@ -1,3 +1,3 @@
1
1
  module GoonModelGen
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goon_model_gen
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
  - akm
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-29 00:00:00.000000000 Z
11
+ date: 2019-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor