Sha256: f933506ec457408a7fbd1ef3dfddb98645ab97e359d3e6fa09774bfe93004267

Contents?: true

Size: 508 Bytes

Versions: 24

Compression:

Stored size: 508 Bytes

Contents

module Buildkite
  module Builder
    class TemplateManager
      def initialize(root)
        @templates = {}

        Loaders::Templates.load(root).each do |name, asset|
          @templates[name.to_s] = asset
        end
      end

      def find(name)
        return unless name

        unless definition = @templates[name.to_s]
          raise ArgumentError, "Template not defined: #{name}"
        end

        definition
      end

      def to_definition
        # No-op
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
buildkite-builder-4.0.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.9.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.8.3 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.8.2 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.8.1 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.8.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.7.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.6.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.5.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.4.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.3.2 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.3.1 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.3.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.2.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.1.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-3.0.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-2.4.1 lib/buildkite/builder/template_manager.rb
buildkite-builder-2.4.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-2.3.0 lib/buildkite/builder/template_manager.rb
buildkite-builder-2.2.0 lib/buildkite/builder/template_manager.rb