Sha256: 57c8da746b16888385f242b327ce90e8e46376aa5a4b5fa82fe3dde557ccb5b0

Contents?: true

Size: 547 Bytes

Versions: 35

Compression:

Stored size: 547 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
          root.join(TEMPLATES_PATH)
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
buildkite-builder-4.1.2 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-4.1.1 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-4.1.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-4.0.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.9.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.8.3 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.8.2 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.8.1 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.8.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.7.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.6.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.5.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.4.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.3.2 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.3.1 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.3.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.2.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.1.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-3.0.0 lib/buildkite/builder/loaders/templates.rb
buildkite-builder-2.4.1 lib/buildkite/builder/loaders/templates.rb