Method: Puppet::Pops::Types::PObjectType#implementation_override=
- Defined in:
- lib/puppet/pops/types/p_object_type.rb
#implementation_override=(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.
The block passed to this method will be passed in a call to ‘#class_eval` on the dynamically generated class for this data type. It’s indended use is to complement or redefine the generated methods and attribute readers.
The method is normally called with the block passed to ‘#implementation` when a data type is defined using DataTypes::create_type.
587 588 589 590 591 592 593 |
# File 'lib/puppet/pops/types/p_object_type.rb', line 587 def implementation_override=(block) if !@implementation_class.nil? || instance_variable_defined?(:@implementation_override) raise ArgumentError, "attempt to redefine implementation override for #{label}" end @implementation_override = block end |