goon_model_gen 0.2.4 → 0.2.5

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: 30ff5d1f177beb2808103274f24fbcab5546bc3403528dd5a855c53569c78308
4
- data.tar.gz: 70fbfb8a03c0955da7c90bc357854a4784e4228e2e086cd41423c10e7b4e55ee
3
+ metadata.gz: 35eae7744ace6ecb88fdce49041734f3cfd1c724ef899e6996e4a4fcdd7ea59a
4
+ data.tar.gz: a32f155f2e6bb40fb48ddf3eb166e67e1d3090948bb7a4e50bd203c86317825c
5
5
  SHA512:
6
- metadata.gz: 8b48907ab44a614aa18d796b4d7133e3a8cc04bf1e395e9ff2415e8169a031cd52bd1a6896791c1a3ffc0298e612b49fff6a737e34a4891eacd9a37de37d96c5
7
- data.tar.gz: e976a0d39384d350a6355a0c683ffacbb7aaabbed330ee4d832ac3011a9df005f66b6a2a05550cf98c3a79377b68c38f84ff164895d923de1240d0e9b187731a
6
+ metadata.gz: bddf0a66939b7a378d6d75fab1a9770068b93817f70122ba8f27c2f2fa15004e0604c065c4d94607a13f3cc6cffdb7b51ff75a3dc604d3cfea5674512516f0d7
7
+ data.tar.gz: 070c8c3081315a3b4721291fb3969b69322378eb33d96d318dec6f5d90f3ea29662ff7bb15736482b2562d7ac6cccf8f0107f76b98fd0304826af2adf3656f48
@@ -55,10 +55,11 @@ module GoonModelGen
55
55
  # @param go_type [Golang::Type]
56
56
  def build_sentences_with(template_base, go_type, generators)
57
57
  m2t = method_to_template_for(template_base)
58
- generators ||= default_generators_for(template_base)
59
- generators.each do |name, suffix|
58
+ generators ||= m2t.keys.each_with_object({}){|name, d| d[name] = true }
59
+
60
+ m2t.each do |name, template|
61
+ suffix = generators[name]
60
62
  next if !suffix
61
- template = m2t[name]
62
63
  raise "No template found for #{name.inspect}" unless template
63
64
  parts = [go_type.name.underscore]
64
65
  custom_suffix = false
@@ -74,11 +75,6 @@ module GoonModelGen
74
75
  end
75
76
  end
76
77
 
77
- def default_generators_for(template_base)
78
- method_to_template_for(template_base).keys.
79
- each_with_object({}){|name, d| d[name] = true }
80
- end
81
-
82
78
  def method_to_template_map
83
79
  @method_to_template_map ||= {}
84
80
  end
@@ -1,3 +1,3 @@
1
1
  module GoonModelGen
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goon_model_gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - akm