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.



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

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

Instance Method Details

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



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

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