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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9835d07159adef42e01da288ad53dd918cbb626896619aadf0891446f22ee2e7
|
4
|
+
data.tar.gz: a89f39e731615da2d590f7e048371ae9f481ca08d4e3f03aa0b7edd092d9884c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
30
|
-
|
31
|
-
|
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
|
{
|
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.
|
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-
|
11
|
+
date: 2019-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|