Class: Puppet::Pops::Binder::BindingsFactory::AbstractBuilder Abstract
- Defined in:
- lib/puppet/pops/binder/bindings_factory.rb
Overview
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
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
The built model object.
Instance Method Summary collapse
-
#initialize(binding) ⇒ AbstractBuilder
constructor
A new instance of AbstractBuilder.
-
#method_missing(meth, *args, &block) ⇒ Object
private
Provides convenient access to the Bindings Factory class methods.
Constructor Details
#initialize(binding) ⇒ AbstractBuilder
Returns a new instance of AbstractBuilder.
108 109 110 |
# File 'lib/puppet/pops/binder/bindings_factory.rb', line 108 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.
117 118 119 120 121 122 123 124 |
# File 'lib/puppet/pops/binder/bindings_factory.rb', line 117 def method_missing(meth, *args, &block) factory = BindingsFactory if factory.respond_to?(meth) factory.send(meth, *args, &block) else super end end |
Instance Attribute Details
#model ⇒ Object (readonly)
The built model object.
104 105 106 |
# File 'lib/puppet/pops/binder/bindings_factory.rb', line 104 def model @model end |