Method: AttributeKit::AttributeHash#delete_if

Defined in:
lib/attribute-kit/attribute_hash.rb

#delete_if {|key, value| ... } ⇒ AttributeHash

Delete keys matching an expression in the provided block

Yields:

  • (key, value)

    block is executed for every key-value pair stored in the instance

Yield Parameters:

  • key (Object)

    the key from the key-value pair being evaluated

  • value (Object)

    the value from the key-value pair being evaluated

Yield Returns:

  • (Boolean)

    whether or not to delete a particular stored key-value pair from the instance

Returns:

See Also:

  • Hash#delete_if


142
# File 'lib/attribute-kit/attribute_hash.rb', line 142

cond_deletion_method(:delete_if)