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.
34 35 36 |
# File 'lib/puppet/pops/types/type_with_members.rb', line 34 def initialize() @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 |