Class: Puppet::Pops::Types::AttrReader
- 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
-
#initialize(message) ⇒ AttrReader
constructor
A new instance of AttrReader.
- #invoke(receiver, scope, args, &block) ⇒ Object
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 = .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 |