Sha256: 0e12bdb665c3c3cf89ca327b0ffd4093bf63bf1c5f2d25d4ddf138b4d6d55f1a

Contents?: true

Size: 731 Bytes

Versions: 6

Compression:

Stored size: 731 Bytes

Contents

# frozen_string_literal: true

module Buildkite
  module Builder
    module Loaders
      class Abstract
        attr_reader :assets
        attr_reader :pipeline

        def self.load(pipeline)
          new(pipeline).assets
        end

        def initialize(pipeline)
          @pipeline = pipeline
          @assets = {}
          load
        end

        private

        def buildkite_path
          Buildkite::Builder.root.join('.buildkite')
        end

        def pipeline_path
          buildkite_path.join("pipelines/#{pipeline}")
        end

        def load
          raise NotImplementedError
        end

        def add(name, asset)
          @assets[name.to_s] = asset
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
buildkite-builder-1.0.0 lib/buildkite/builder/loaders/abstract.rb
buildkite-builder-1.0.0.beta.5 lib/buildkite/builder/loaders/abstract.rb
buildkite-builder-1.0.0.beta.4 lib/buildkite/builder/loaders/abstract.rb
buildkite-builder-1.0.0.beta.3 lib/buildkite/builder/loaders/abstract.rb
buildkite-builder-1.0.0.beta.2 lib/buildkite/builder/loaders/abstract.rb
buildkite-builder-1.0.0.beta.1 lib/buildkite/builder/loaders/abstract.rb