Skip to content

Instantly share code, notes, and snippets.

@hackvan
Last active December 13, 2018 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hackvan/8f9d7d013d9160f2bd4a0aefa44bf5d6 to your computer and use it in GitHub Desktop.
Save hackvan/8f9d7d013d9160f2bd4a0aefa44bf5d6 to your computer and use it in GitHub Desktop.
instance_variable_set(name, value) # Nos permite definir y asignar un valor a una nueva variable de instancia
define_method(name, &block) # Nos permite definir dentro de la clase un método de manera dinámica y en tiempo de ejecución
method_missing(name, *args, &block) # Nos permite capturar y manejar la excepción que se dispara cuando llamamos un método no definido dentro de una clase.
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment