Method: Puppet::Type.attrclass
- Defined in:
- lib/puppet/type.rb
.attrclass(name) ⇒ Class?
Returns the class associated with the given attribute name.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/puppet/type.rb', line 133 def self.attrclass(name) @attrclasses ||= {} # We cache the value, since this method gets called such a huge number # of times (as in, hundreds of thousands in a given run). unless @attrclasses.include?(name) @attrclasses[name] = case attrtype(name) when :property; @validproperties[name] when :meta; @@metaparamhash[name] when :param; @paramhash[name] end end @attrclasses[name] end |