E
E
eldar_web2015-12-21 10:14:31
ruby
eldar_web, 2015-12-21 10:14:31

How can an element be removed from a hash in Ruby?

For example, there is a user[:my_profile][:name] hash.
How can I completely remove [:name] from the hash so that user[:my_profile] remains like this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Артем Пьянков, 2015-12-21
@eldar_web

ruby-doc.org/core-2.2.3/Hash.html#method-i-delete

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question