lib/jss/api_object/extendable.rb in ruby-jss-0.10.2 vs lib/jss/api_object/extendable.rb in ruby-jss-0.11.0a5

- old
+ new

@@ -170,10 +170,23 @@ @ext_attrs[name] = value @changed_eas << name @need_to_update = true end + # are there any changes in the EAs needing to be saved? + # + # @return [Boolean] + # + def unsaved_eas? + @need_to_update && @changed_eas && !@changed_eas.empty? + end + # @api private + # + # TODO: make this (and all XML amending) method take the in-progress XML doc and + # add (or not) the EA xml to it. + # See how Sitable#add_site_to_xml works, as called from + # Computer.rest_xml # # @return [REXML::Element] An <extension_attribute> element to be # included in the rest_xml of objects that mix-in this module. # def ext_attr_xml