Module: Puppet::Pops::Types::InvocableMember

Included in:
AttrReader, PObjectType::PAnnotatedMember
Defined in:
lib/puppet/pops/types/type_with_members.rb

Overview

Interface implemented by attribute and function members

Instance Method Summary collapse

Instance Method Details

#invoke(receiver, scope, 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.

Performs type checking of arguments and invokes the method that corresponds to this method. The result of the invocation is returned

Parameters:

  • receiver (Object)

    The receiver of the call

  • scope (Puppet::Parser::Scope)

    The caller scope

  • args (Array)

    Array of arguments.

Returns:

  • (Object)

    The result returned by the member function or attribute

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/puppet/pops/types/type_with_members.rb', line 24

def invoke(receiver, scope, args, &block)
  raise NotImplementedError, "'#{self.class.name}' should implement #invoke"
end