lib/jamf/api/resources/collection_resources/inventory_preload_record.rb
def clear
      OBJECT_MODEL.keys.each do |attr|
        next if UNCLEARABLE_ATTRS.include? attr

        if attr == :extensionAttributes
          extensionAttributes = []
          next
        end

        # skip nils
        curr_val = send attr
        next unless curr_val

        send "#{attr}=", nil
      end
    end
# clear all values for this record except id, serialNumber, and deviceType
clear all values for this record except id, serialNumber, and deviceType
clear all values for this record except id serialNumber and deviceType
def clear
      OBJECT_MODEL.keys.each do |attr|
        next if UNCLEARABLE_ATTRS.include? attr
        if attr == :extensionAttributes
          extensionAttributes = []
          next
        end
        curr_val = send attr
        next unless curr_val
        send "#{attr}=", nil
      end
    end
def clear OBJECT_MODEL . keys . each do | attr | next if UNCLEARABLE_ATTRS . include? attr if attr == :extensionAttributes extensionAttributes = [ ] next end curr_val = send attr next unless curr_val send "#{attr}=" , nil end end
clear all values for this record except id, serialNumber, and deviceType
clear all values for this record except id serialNumber and deviceType
# skip nils