Class: Puppet::Pops::Lookup::DataAdapter Private

Inherits:
Adaptable::Adapter show all
Defined in:
lib/puppet/pops/lookup/data_adapter.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Direct Known Subclasses

LookupAdapter

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Adaptable::Adapter

adapt, adapt_new, associate_adapter, clear, get, instance_var_name, self_attr_name, type_name

Constructor Details

#initializeDataAdapter

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DataAdapter.



12
13
14
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 12

def initialize
  @data = {}
end

Class Method Details

.create_adapter(o) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 8

def self.create_adapter(o)
  new
end

Instance Method Details

#[](name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 16

def [](name)
  @data[name]
end

#[]=(name, value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



24
25
26
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 24

def []=(name, value)
  @data[name] = value
end

#include?(name) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


20
21
22
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 20

def include?(name)
  @data.include? name
end