# Declarar
hash_person = {"nombre" => "Juan"}
hash_person["Apellido"] = "Aristizabal"
# Acceder
nombre = hash_person["nombre"] # Por Key
index = hash_person.key("Juan") # Me devuelve el Key
# Metodos interesantes
hash_person.keys
hash_person.values
hash_person.length
hash_person.size
hash_person.to_a #To an Array
hash_person.clear
Last active
September 20, 2017 22:17
-
-
Save jcaristy/b82aedb054cd6a3c13ebdd9fb73aec77 to your computer and use it in GitHub Desktop.
[RoR: Hashes] #ruby
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment