diff options
author | C. Bess <cbess@company.com> | 2015-11-23 13:06:30 -0600 |
---|---|---|
committer | C. Bess <cbess@company.com> | 2015-11-23 13:06:30 -0600 |
commit | 8ca7f472eccdb116d597a2a8d888c188d797469e (patch) | |
tree | 4d31ab95dc5c435361e10eaa3a18ca9ab8cfd6b1 /ruby.html.markdown | |
parent | 99b2c3db3705b5231ca360c9fa69c8319caab69b (diff) | |
parent | 2d67c58d7f4ea457e756e0973bba0c25a499957e (diff) |
Merge remote-tracking branch 'adambard/master'
Diffstat (limited to 'ruby.html.markdown')
-rw-r--r-- | ruby.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown index 243f788b..cf1a18e3 100644 --- a/ruby.html.markdown +++ b/ruby.html.markdown @@ -230,8 +230,8 @@ new_hash = { defcon: 3, action: true } new_hash.keys #=> [:defcon, :action] # Check existence of keys and values in hash -new_hash.has_key?(:defcon) #=> true -new_hash.has_value?(3) #=> true +new_hash.key?(:defcon) #=> true +new_hash.value?(3) #=> true # Tip: Both Arrays and Hashes are Enumerable # They share a lot of useful methods such as each, map, count, and more |