Note:
If you’re looking for a method that is designed to alter attributes by rewritting their contents see #filter_attrs_from_set
Note:
Combining the flags process_all
and no_presence_check
may raise exception if some attribute from the given set doesn’t exist
This method returns an undefined value.
This generic method calls the passed block for each attribute that belongs to the given set of attributes. It’s major purpose is to iterate through attributes and/or work directly with their values.
Only the changed attributes/properties are selected, unless the process_all
flag is given. If that flag is given then presence of each attribute is verified, unless the no_presence_check
flag is also set. Attributes with empty or unset values are ignored (but see the flag called process_blank
).
The result of the given block is not used to set the processed attribute. The only way to alter attribute values using this method is to use bang method in a block or explicitly assign new, calculated value to the attribute using its name (also passed to a block as one of arguments).