Sha256: 2476ff785c397a8263805ef45174600c952adb54ae48821b8c9238961e609414

Contents?: true

Size: 557 Bytes

Versions: 4

Compression:

Stored size: 557 Bytes

Contents

require "goon_model_gen"

require "goon_model_gen/golang/type"

module GoonModelGen
  module Golang
    class NamedSlice < Type
      attr_reader :base_type_name
      attr_reader :base_type

      # @param name [String]
      # @param base_type_name [String]
      def initialize(name, base_type_name)
        super(name)
        @base_type_name = base_type_name
      end

      # @param pkgs [Packages]
      def resolve(pkgs)
        @base_type = pkgs.type_for(base_type_name) || raise("#{base_type_name.inspect} not found")
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
goon_model_gen-0.1.3 lib/goon_model_gen/golang/named_slice.rb
goon_model_gen-0.1.2 lib/goon_model_gen/golang/named_slice.rb
goon_model_gen-0.1.1 lib/goon_model_gen/golang/named_slice.rb
goon_model_gen-0.1.0 lib/goon_model_gen/golang/named_slice.rb