initialize

in lib/logstash-docket/artifact_plugin.rb [63:76]


    def initialize(repository:,version:)
      if repository.name !~ VALID_PLUGIN_CAPTURING_TYPE_AND_NAME
        fail(ArgumentError, "invalid plugin name `#{repository.name}`")
      end
      super(type: Regexp.last_match(:type), name: Regexp.last_match(:name))

      fail("#{desc} plugin type #{type} not supported as a top-level plugin") unless SUPPORTED_TYPES.include?(type)

      @repository = repository
      @version = version && Gem::Version.new(version)

      @embedded_plugins = Util::ThreadsafeDeferral.for(&method(:generate_embedded_plugins))
    end