class Puppet::Bindings::NamedBindingsAdapter

A NamedBindingsAdapter holds a map of name to Puppet::Pops::Binder::Bindings::NamedBindings. It is intended to be used as an association between an Environment and named bindings.

Public Instance Methods

[](name) click to toggle source
# File lib/puppet/bindings.rb, line 127
def [](name)
  @named_bindings[name]
end
[]=(name, value) click to toggle source
# File lib/puppet/bindings.rb, line 135
def []=(name, value)
  unless value.is_a?(Puppet::Pops::Binder::Bindings::NamedBindings) || value.is_a?(Proc)
    raise ArgumentError, "Given value must be a NamedBindings, or a Proc producing one, got: #{value.class}."
  end
  @named_bindings[name] = value
end
each_pair(&block) click to toggle source
# File lib/puppet/bindings.rb, line 142
def each_pair(&block)
  @named_bindings.each_pair(&block)
end
has_name?(name) click to toggle source
# File lib/puppet/bindings.rb, line 131
def has_name?(name)
  @named_bindings.has_key?
end

Public Class Methods

new() click to toggle source
# File lib/puppet/bindings.rb, line 123
def initialize()
  @named_bindings = {}
end