Skip to content

Instantly share code, notes, and snippets.

@jcaristy
Created September 20, 2017 22:28
Show Gist options
  • Save jcaristy/e471083af46d70c25e37d92d1b2954e6 to your computer and use it in GitHub Desktop.
Save jcaristy/e471083af46d70c25e37d92d1b2954e6 to your computer and use it in GitHub Desktop.
[RoR: Symbols] #ruby

Symbols

Son como un String pero que solo se instancia una sola vez en memoria. La idea es que en los Hash siempre se utilicen Symbols y no Strings

# Ejemplo
hash_person = {:nombre => "Juan"}
hash_person[:Apellido] = "Aristizabal"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment