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.


10
11
12
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 10

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.


6
7
8
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 6

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.


14
15
16
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 14

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.


22
23
24
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 22

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)

18
19
20
# File 'lib/puppet/pops/lookup/data_adapter.rb', line 18

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