Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
21.3K+ articles
Python
21.3K+ articles
Experiences
16.6K+ articles
Interview Experiences
14.2K+ articles
JavaScript
12.1K+ articles
School Learning
11.5K+ articles
Java
10.0K+ articles
Ruby
1.2K+ articles
Ruby-Methods
926+ articles
Ruby Hash-class
56 posts
Recent Articles
Popular Articles
Ruby | Hash rehash function
Last Updated: 07 January 2020
Hash#rehash() : rehash() is a Hash class method which based on the current hash value rebuilds the hash for each key. This will reindex hash if the values of key objects h...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash select!() method
Last Updated: 07 January 2020
Hash#select!() is a Hash class method which checks whether the array from the hash ius present based on the block condition. Syntax: Hash.select!()Parameter: Hash valuesbl...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash replace() method
Last Updated: 07 January 2020
Hash#replace() : replace() is a Hash class method which replaces the content of one hash with other.Syntax: Hash.replace()Parameter: Hash valuesReturn: replaces the conten...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash select() method
Last Updated: 07 January 2020
Hash#select() : select() is a Hash class method which finds the array from the hash based on the block condition. Syntax: Hash.select()Parameter: Hash valuesblock conditio...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash to_proc method
Last Updated: 07 January 2020
Hash#to_proc() : to_proc() is a Hash class method which returns a Proc which maps 'keys' value to 'value' value.Syntax: Hash.to_proc()Parameter: Hash valuesReturn: Proc wh...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash to_s method
Last Updated: 07 January 2020
Hash#to_s() is a Hash class method which gives the string representation of the hash.Syntax: Hash.to_s()Parameter: Hash valuesReturn: string representation of the hash.Exa...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash values function
Last Updated: 07 January 2020
Hash#values() is a Hash class method which returns the values present in the hash.Syntax: Hash.values()Parameter: Hash valuesReturn: hash valuesExample #1 :Ruby ...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash value? method
Last Updated: 02 December 2021
Hash#value?() is a Hash class method which checks whether the argumented 'value' is present in the array or not. Syntax: Hash.value?()Parameter: Hash value?Return: true - ...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash to_hash method
Last Updated: 07 January 2020
Hash#to_hash() is a Hash class method which returns the self - hash representation of the hash.Syntax: Hash.to_hash()Parameter: Hash valuesReturn: self objectExample #1 :R...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash values_at method
Last Updated: 07 January 2020
Hash#values_at() is a Hash class method which returns the array containing the values corresponding to keys.Syntax: Hash.values_at()Parameter: Hash values_atReturn: array ...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash shift() method
Last Updated: 07 January 2020
Hash#shift() is a Hash class method which removes a key-value pair from hash and then it returns these value as two-item array. Syntax: Hash.shift()Parameter: Hash valuesR...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash size() method
Last Updated: 07 January 2020
Hash#size() is a Hash class method which returns the count of key-value pair in the hash.Syntax: Hash.size()Parameter: Hash valuesReturn: count of key-value pair in the ha...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash to_a method
Last Updated: 07 January 2020
Hash#to_a() is a Hash class method which gives a nested array of the key-value pair.Syntax: Hash.to_a()Parameter: Hash valuesReturn: array representation of the hashExampl...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash store() method
Last Updated: 13 May 2021
Hash#store() is a Hash class method that returns an add-on value with the key given by the key-value argument. Syntax: Hash.store()Parameter: Hash values key valueReturn: ...
read more
Ruby
Ruby-Methods
Ruby Hash-class
Ruby | Hash to_h method
Last Updated: 07 January 2020
Hash#to_h() is a Hash class method which returns the self - hash representation of the hashSyntax: Hash.to_h()Parameter: Hash valuesReturn: self objectExample #1 :Ruby ...
read more
Ruby
Ruby-Methods
Ruby Hash-class
1
2
3
4
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !