Method: Puppet::Provider::AixObject#load_attribute
- Defined in:
- lib/vendor/puppet/provider/aixobject.rb
#load_attribute(key, value, mapping, objectinfo) ⇒ Object
Loads an AIX attribute (key=value) and stores it in the given hash with puppet semantics. It translates the pair using the given mapping.
This operation works with each property one by one, subclasses must reimplement this if more complex operations are needed
| 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | # File 'lib/vendor/puppet/provider/aixobject.rb', line 89 def load_attribute(key, value, mapping, objectinfo) if mapping.nil? objectinfo[key] = value elsif mapping[key].nil? # is not present in mapping, ignore it. true elsif mapping[key][:method].nil? objectinfo[mapping[key][:key]] = value elsif objectinfo[mapping[key][:key]] = method(mapping[key][:method]).call(value) end return objectinfo end |