# File lib/puppet/provider/nameservice/directoryservice.rb, line 324 324: def ensure=(ensure_value) 325: super 326: # We need to loop over all valid properties for the type we're 327: # managing and call the method which sets that property value 328: # dscl can't create everything at once unfortunately. 329: if ensure_value == :present 330: @resource.class.validproperties.each do |name| 331: next if name == :ensure 332: # LAK: We use property.sync here rather than directly calling 333: # the settor method because the properties might do some kind 334: # of conversion. In particular, the user gid property might 335: # have a string and need to convert it to a number 336: if @resource.should(name) 337: @resource.property(name).sync 338: elsif value = autogen(name) 339: self.send(name.to_s + "=", value) 340: else 341: next 342: end 343: end 344: end 345: end