Sha256: ea392af2d5f00bde4e7b0920d44eed1831061da5ad93ca78410d0804e98e83d1
Contents?: true
Size: 380 Bytes
Versions: 6
Compression:
Stored size: 380 Bytes
Contents
# About Hashes Create a hash: ```ruby h = {} p h.class Hash p h {} ``` Initialize a hash: ```ruby h = {:a => 0, :b => 1} p h {:a=>0, :b=>1} ``` Change a value: ```ruby h[:b] = 2 p h {:a=>0, :b=>2} ``` Add a new entry: ```ruby h[:c] = 2 p h {:a=>0, :b=>2, :c=>2} ``` Delete an entry: ```ruby h.delete(:a) p h {:b=>2, :c=>2} ```
Version data entries
6 entries across 6 versions & 1 rubygems