Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Menu
delete_if « Hash « Ruby
Ruby
Hash
delete_if
1.
Deleting Hash Elements Conditionally
2.
Delete if with block logics
3.
Delete if for a certain value
4.
delete_if uses a block
5.
delete_if passes all pairs into the block, so you can delete based on a key or a value.