method
delete_if
delete_if()
public
Deletes every key-value pair from hsh for which block evaluates to true.
h = { "a" => 100, "b" => 200, "c" => 300 } h.delete_if {|key, value| key >= "b" } #=> {"a"=>100}
delete_if()
public
Deletes every key-value pair from hsh for which block evaluates to true.
h = { "a" => 100, "b" => 200, "c" => 300 } h.delete_if {|key, value| key >= "b" } #=> {"a"=>100}