class Puppet::Environments::Static

A source of pre-defined environments.

@api private

Public Instance Methods

get(name) click to toggle source

@!macro loader_get

# File lib/puppet/environments.rb, line 102
def get(name)
  @environments.find do |env|
    env.name == name.intern
  end
end
get_conf(name) click to toggle source

Returns a basic environment configuration object tied to the environment’s implementation values. Will not interpolate.

@!macro loader_get_conf

# File lib/puppet/environments.rb, line 112
def get_conf(name)
  env = get(name)
  if env
    Puppet::Settings::EnvironmentConf.static_for(env, Puppet[:parser])
  else
    nil
  end
end
list() click to toggle source

@!macro loader_list

# File lib/puppet/environments.rb, line 97
def list
  @environments
end
search_paths() click to toggle source

@!macro loader_search_paths

# File lib/puppet/environments.rb, line 92
def search_paths
  ["data:text/plain,internal"]
end

Public Class Methods

new(*environments) click to toggle source
# File lib/puppet/environments.rb, line 87
def initialize(*environments)
  @environments = environments
end