Class: Puppet::Pops::Binder::BindingsFactory::AbstractBuilder Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/pops/binder/bindings_factory.rb

Overview

This class is abstract.

Abstract base class for bindings object builders. Supports delegation of method calls to the BindingsFactory class methods for all methods not implemented by a concrete builder.

Direct Known Subclasses

BindingsBuilder, BindingsContainerBuilder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(binding) ⇒ AbstractBuilder

Returns a new instance of AbstractBuilder.

Parameters:



106
107
108
# File 'lib/puppet/pops/binder/bindings_factory.rb', line 106

def initialize(binding)
  @model = binding
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ 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.

Provides convenient access to the Bindings Factory class methods. The intent is to provide access to the methods that return producers for the purpose of composing more elaborate things than the builder convenience methods support directly.



115
116
117
118
119
120
121
122
# File 'lib/puppet/pops/binder/bindings_factory.rb', line 115

def method_missing(meth, *args, &block)
  factory = Puppet::Pops::Binder::BindingsFactory
  if factory.respond_to?(meth)
    factory.send(meth, *args, &block)
  else
    super
  end
end

Instance Attribute Details

#modelObject (readonly)

The built model object.



102
103
104
# File 'lib/puppet/pops/binder/bindings_factory.rb', line 102

def model
  @model
end