Sha256: e986137f8c7d69b5cbf0873cc3b18db680b4bb1a8adc95cc3cd6d3e770705c70

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

Stored size: 457 Bytes

Contents

module Buildkite
  module Builder
    class PluginRegistry
      def initialize
        @plugins = {}
      end

      def add(name, uri, version)
        name = name.to_s

        if @plugins.key?(name)
          raise ArgumentError, "Plugin already defined: #{name}"
        end

        @plugins[name] = [uri, version]
      end

      def fetch(name)
        @plugins[name]
      end

      def to_definition
        # No-op
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
buildkite-builder-2.0.0.beta2 lib/buildkite/builder/plugin_registry.rb
buildkite-builder-2.0.0.beta1 lib/buildkite/builder/plugin_registry.rb