name=(newname)
 Save changes to the JSS

 @return [Boolean] success
763176
def update
      return nil unless @need_to_update
      raise JSS::UnsupportedError, "Editing #{self.class::RSRC_LIST_KEY} isn't yet supported. Please use other Casper workflows." unless updatable?
      raise JSS::NoSuchItemError, "Not In JSS! Use #create to create this #{self.class::RSRC_OBJECT_KEY} in the JSS before updating it." unless @in_jss
      @api.put_rsrc @rest_rsrc, rest_xml
      @need_to_update = false
      refresh_icon if self_servable?
      @id
    end
205138
def save!
      object = self.class.name.split("::").last.downcase
      data = {}

      self.class.accessor_properties.each do |property|
        data[property] = instance_variable_get "@#{property}"
      end

      API.send("update_#{object}", @id, data)
    end
1324761
def save(element, changeset)
      response = if element.id.nil?
        create(element, changeset)
      else
        update(element, changeset)
      end
    end
1192028
def url=(new_val)
      return nil if new_val == @url
      # handy - from http://stackoverflow.com/questions/1805761/check-if-url-is-valid-ruby#1805788
      url_ok = new_val =~ /\A#{URI.regexp(%w(http https))}\z/
      raise JSS::InvalidDataError, 'New value is not a valid http(s) url' unless url_ok && url_ok.zero?
      @url = new_val
      @need_to_update = true
    end
1067591
def modify(name, old_value, new_value)
      @attributes[name] = new_value
      if @modifications && (old_value != new_value)
        original = @modifications[name].first if @modifications[name]
        @modifications[name] = [ (original || old_value), new_value ]
      end
    end
214488
def changes
      changes = {'new' => {}, 'obsolete' => {}, 'updated' => {}}

      if @environment.nil?
        new_environments.each do |env|
          changes['new'][env] = {}
        end

        old_environments.each do |env|
          changes['obsolete'][env] = {}
        end
      else
        env = @environment
        changes['new'][env] = {} if new_environments.include?(@environment)
        changes['obsolete'][env] = {} if old_environments.include?(@environment)
      end
      changes
    end
210578
function(name) {
    for (var i = 0, len = this.asyncRules.length; i < len; i++) {
      if (this.asyncRules[i] === name) {
        return true;
      }
    }
    return false;
  }
1225773
def last_name=(last_name)
      name = Name.new('First', last_name)
      raise "invalid last name" unless name.last.length > 0 && name.first.length > 0
      @last_name = name.last
    end
1307259
def rename(new_name)
      json_body = { :name => new_name }.to_json
      HTTParty.put(base_request_uri, :body => json_body)
      @name = new_name
    end
1327840
function(name) {
			var element = this.get(name);
			if (element) {
				this._updateSource('', element.fullRange());
				var ix = this._children.indexOf(element);
				if (~ix) {
					this._children.splice(ix, 1);
				}
			}
		}
1349311
function wrapmethods(sess) {
      var _reload = sess.reload
      var _save = sess.save;

      function reload(callback) {
        debug('reloading %s', this.id)
        _reload.call(this, function () {
          wrapmethods(req.session)
          callback.apply(this, arguments)
        })
      }

      function save() {
        debug('saving %s', this.id);
        savedHash = hash(this);
        _save.apply(this, arguments);
      }

      Object.defineProperty(sess, 'reload', {
        configurable: true,
        enumerable: false,
        value: reload,
        writable: true
      })

      Object.defineProperty(sess, 'save', {
        configurable: true,
        enumerable: false,
        value: save,
        writable: true
      });
    }
1028005
function (parsedName) {
      parsedName.name = parsedName.name.replace(/\./g, '_');
      if (parsedName.name === 'basic') {
        parsedName.name = '';
      }
    }
587937
def make_available_after_install=(new_val)
      return nil if new_val == @make_available_after_install
      raise JSS::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
      @make_available_after_install = new_val
      @need_to_update = true
    end
1019537
def host_externally=(new_val)
      return nil if new_val == @host_externally
      raise JSS::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
      @host_externally = new_val
      @need_to_update = true
    end
1266144
def save!(options={:validate => true})
      unless save(options)
        raise Riagent::InvalidDocumentError.new(self)
      end
      true
    end
394304
def reload
      if new_record?
        false
      else
        reloaded_element = self.class.find(self.id)
        @attributes = reloaded_element.attributes
        reset_modifications
        true
      end
    end
1031609
def offline=(new_val)
      raise JSS::InvalidDataError, 'New value must be boolean true or false' unless JSS::TRUE_FALSE.include? new_val
      @offline = new_val
      @need_to_update = true
    end