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

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

Overview

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.

API:

  • private

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.

API:

  • private



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

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.

API:

  • private



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

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.

API:

  • private



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

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.

API:

  • private



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

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:

API:

  • private



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

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