write only the attributes that we have set
976479
def save_writable_attributes(asset, attributes)
      valid_keys = [:parent, :path]
      accessable_attributes = {}
      attributes.each do |key, value|
         accessable_attributes[key] = value.dup if valid_keys.include?(key)
      end
      asset.configuration.save(accessable_attributes)
    end
708364
def set_attributes(self, attrs):
        
        if self.true_color() and not self.ansi_colors_only():
            self.write_raw(self._escape_code_cache_true_color[attrs])
        else:
            self.write_raw(self._escape_code_cache[attrs])
510345
def readonly_attributes(*attrs)
      @readonly_attributes ||= [:created_at, :updated_at, :completed_at]
      if attrs.any?
        @readonly_attributes.map!(&:to_sym).concat(attrs).uniq!
        setup_attributes(@readonly_attributes, true)
      end
      @readonly_attributes
    end
164369
def attributes!(object, *attrs)
      attrs.each do |attr|
        method_missing attr, object.send(attr)
      end
    end
1306934
def set_attributes_for exc, request
      self.backtrace      = exc.backtrace.join("\n"),
      self.request_url    = request.original_url,
      self.request_method = request.request_method,
      self.parameters     = request.filtered_parameters,
      self.user_agent     = request.user_agent,
      self.client_ip      = request.remote_ip,
      self.status         = "new",
      self.description    = exc.inspect
    end
809663
public void write(XMLStreamWriter writer) throws XMLStreamException {
      for (Attribute<?> attr : attributes.values()) {
         if (attr.isPersistent())
            attr.write(writer, attr.getAttributeDefinition().xmlName());
      }
   }
1048658
def field2write_only(self, field, **kwargs):
        
        attributes = {}
        if field.load_only and self.openapi_version.major >= 3:
            attributes["writeOnly"] = True
        return attributes
280914
def instance_writers
      _attrs.keys.map { |m| "#{m}=".to_sym }.select { |m| method_defined?(m) }
    end
935392
int writeParameterAttrs(MethodSymbol m) {
        boolean hasVisible = false;
        boolean hasInvisible = false;
        if (m.params != null) {
            for (VarSymbol s : m.params) {
                for (Attribute.Compound a : s.getRawAttributes()) {
                    switch (types.getRetention(a)) {
                    case SOURCE: break;
                    case CLASS: hasInvisible = true; break;
                    case RUNTIME: hasVisible = true; break;
                    default: // /* fail soft */ throw new AssertionError(vis);
                    }
                }
            }
        }

        int attrCount = 0;
        if (hasVisible) {
            int attrIndex = writeAttr(names.RuntimeVisibleParameterAnnotations);
            writeParamAnnotations(m, RetentionPolicy.RUNTIME);
            endAttr(attrIndex);
            attrCount++;
        }
        if (hasInvisible) {
            int attrIndex = writeAttr(names.RuntimeInvisibleParameterAnnotations);
            writeParamAnnotations(m, RetentionPolicy.CLASS);
            endAttr(attrIndex);
            attrCount++;
        }
        return attrCount;
    }
805874
def set_attrs(self):
        
        self.attrs.encoding = self.encoding
        self.attrs.errors = self.errors
33840
def have_attributes(attr, *more)
      sum = (more << attr)
      sum.each do |name|
        raise ArgumentError, "Reserved attribute name #{name}" if @verbotten.include?(name)
      end
      @attributes += sum
    end
1160648
def _AssAttr(self, t):
        
        self._dispatch(t.expr)
        self._write('.'+t.attrname)
1066453
def dirty_attributes
      dirty_attributes = {}

      original_attributes.each_key do |property|
        next unless property.respond_to?(:dump)
        dirty_attributes[property] = property.dump(property.get!(self))
      end

      dirty_attributes
    end
565868
def set(object, attributes)
      coerce(attributes).each do |name, value|
        writer_name = "#{name}="
        if object.allowed_writer_methods.include?(writer_name)
          object.__send__(writer_name, value)
        end
      end
    end
668265
int writeParameterAttrs(MethodSymbol m) {
        boolean hasVisible = false;
        boolean hasInvisible = false;
        if (m.params != null) {
            for (VarSymbol s : m.params) {
                for (Attribute.Compound a : s.getRawAttributes()) {
                    switch (types.getRetention(a)) {
                    case SOURCE: break;
                    case CLASS: hasInvisible = true; break;
                    case RUNTIME: hasVisible = true; break;
                    default: ;// /* fail soft */ throw new AssertionError(vis);
                    }
                }
            }
        }

        int attrCount = 0;
        if (hasVisible) {
            int attrIndex = writeAttr(names.RuntimeVisibleParameterAnnotations);
            databuf.appendByte(m.params.length());
            for (VarSymbol s : m.params) {
                ListBuffer<Attribute.Compound> buf = new ListBuffer<Attribute.Compound>();
                for (Attribute.Compound a : s.getRawAttributes())
                    if (types.getRetention(a) == RetentionPolicy.RUNTIME)
                        buf.append(a);
                databuf.appendChar(buf.length());
                for (Attribute.Compound a : buf)
                    writeCompoundAttribute(a);
            }
            endAttr(attrIndex);
            attrCount++;
        }
        if (hasInvisible) {
            int attrIndex = writeAttr(names.RuntimeInvisibleParameterAnnotations);
            databuf.appendByte(m.params.length());
            for (VarSymbol s : m.params) {
                ListBuffer<Attribute.Compound> buf = new ListBuffer<Attribute.Compound>();
                for (Attribute.Compound a : s.getRawAttributes())
                    if (types.getRetention(a) == RetentionPolicy.CLASS)
                        buf.append(a);
                databuf.appendChar(buf.length());
                for (Attribute.Compound a : buf)
                    writeCompoundAttribute(a);
            }
            endAttr(attrIndex);
            attrCount++;
        }
        return attrCount;
    }
787023
def _initialize_attributes(self, data):
    """"""
    attrs = dict(self.attrs)

    if self.primary_key_name is None:
      pass
    elif isinstance(self.primary_key_name, str):
      if self.primary_key_name not in attrs:
        attrs[self.primary_key_name] = None
    else:
      for pkey in self.primary_key_name:
        if pkey not in attrs:
          attrs[pkey] = None

    if self.timestamps:
      for ts_name in self.timestamps:
        if ts_name is not None and ts_name not in attrs:
          attrs[ts_name] = None

    for attr_name in attrs:
      setattr(self, attr_name, get_value(data, attr_name, attrs[attr_name]))
655908
def write_keys(attrs)
      attrs.each { |key, value| proxy_writer(key, value) if writeable?(key) }
      self
    end