class GoonModelGen::Golang::CombinationType::ItemType

Attributes

name[R]
package_base_path[R]
package_path[R]
type[R]

Public Class Methods

new(name, package_path, package_base_path = nil) click to toggle source
# File lib/goon_model_gen/golang/combination_type.rb, line 11
def initialize(name, package_path, package_base_path = nil)
  @name, @package_path, @package_base_path = name, package_path, package_base_path
end

Public Instance Methods

resolve(pkgs) click to toggle source

@param pkgs [Packages]

# File lib/goon_model_gen/golang/combination_type.rb, line 20
def resolve(pkgs)
  @type = pkgs.type_by(**to_hash) || raise("Type not found by #{to_hash.inspect}")
end
to_hash() click to toggle source
# File lib/goon_model_gen/golang/combination_type.rb, line 15
def to_hash
  {name: name, package_path: package_path, package_base_path: package_base_path}
end