hsh.delete_if {| key, value | block } â hsh
hsh.delete_if â an_enumerator
hsh.delete_if â an_enumerator
Instance Public methods
Deletes every key-value pair from hsh for which block
evaluates to true
.
If no block is given, an enumerator is returned instead.
h = { "a" => 100, "b" => 200, "c" => 300 } h.delete_if {|key, value| key >= "b" } #=> {"a"=>100}
Please login to continue.