Class: Puppet::Pops::Types::AttrReader

Inherits:
Object
  • Object
show all
Includes:
InvocableMember
Defined in:
lib/puppet/pops/types/type_with_members.rb

Overview

Plays the same role as an PAttribute in the PObjectType. Provides access to known attr_readers and plain reader methods.

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ AttrReader

Returns a new instance of AttrReader.



34
35
36
# File 'lib/puppet/pops/types/type_with_members.rb', line 34

def initialize(message)
  @message = message.to_sym
end

Instance Method Details

#invoke(receiver, scope, args, &block) ⇒ Object



38
39
40
# File 'lib/puppet/pops/types/type_with_members.rb', line 38

def invoke(receiver, scope, args, &block)
  receiver.send(@message)
end