Sha256: 1fe53ed68231a91a744236d44aacb07ab7dd4e34c935750d21faee3ef2feae71

Contents?: true

Size: 610 Bytes

Versions: 3

Compression:

Stored size: 610 Bytes

Contents

# frozen_string_literal: true

module Buildkite
  module Pipelines
    module Steps
      class Abstract
        include Attributes

        attr_reader :pipeline
        attr_reader :template

        def self.to_sym
          name.split('::').last.downcase.to_sym
        end

        def initialize(pipeline, template = nil, **args, &block)
          @pipeline = pipeline
          @template = template
          context = StepContext.new(self, **args)

          instance_exec(context, &template) if template
          instance_exec(context, &block) if block_given?
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
buildkite-builder-1.3.0 lib/buildkite/pipelines/steps/abstract.rb
buildkite-builder-1.2.0 lib/buildkite/pipelines/steps/abstract.rb
buildkite-builder-1.1.0 lib/buildkite/pipelines/steps/abstract.rb