Method: Puppet::Type#value
- Defined in:
- lib/puppet/type.rb
#value(name) ⇒ Object?
TODO:
Comment says “Return a specific value for an attribute.”, as opposed to what “An unspecific value”???
TODO:
is this the ‘is’ or the ‘should’ value?
TODO:
why is the return restricted to things that respond to :value? (Only non structural basic data types supported?
Returns the value of the attribute having the given name, or nil if the given name is not an attribute, or the referenced attribute does not respond to ‘:value`.
901 902 903 904 905 906 907 908 909 910 |
# File 'lib/puppet/type.rb', line 901 def value(name) name = name.intern obj = @parameters[name] if obj && obj.respond_to?(:value) obj.value else nil end end |