class Buildkite::Builder::TemplateManager

Public Class Methods

new(root) click to toggle source
# File lib/buildkite/builder/template_manager.rb, line 4
def initialize(root)
  @templates = {}

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

Public Instance Methods

find(name) click to toggle source
# File lib/buildkite/builder/template_manager.rb, line 12
def find(name)
  return unless name

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

  definition
end
to_definition() click to toggle source
# File lib/buildkite/builder/template_manager.rb, line 22
def to_definition
  # No-op
end