Sha256: 3d88b8a12daea3ae7ab7fca2a0f0258437ff516c3472f73b797fe58423f16078

Contents?: true

Size: 556 Bytes

Versions: 6

Compression:

Stored size: 556 Bytes

Contents

# frozen_string_literal: true

module Buildkite
  module Builder
    module Loaders
      class Templates < Abstract
        include Definition::Helper

        TEMPLATES_PATH = Pathname.new('templates').freeze

        def load
          return unless templates_path.directory?

          templates_path.children.sort.each do |file|
            add(file.basename('.rb'), load_definition(file, Definition::Template))
          end
        end

        def templates_path
          pipeline_path.join(TEMPLATES_PATH)
        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/templates.rb
buildkite-builder-1.0.0.beta.5 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-1.0.0.beta.4 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-1.0.0.beta.3 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-1.0.0.beta.2 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-1.0.0.beta.1 lib/buildkite/builder/loaders/templates.rb