Skip to content

Instantly share code, notes, and snippets.

@mrpunkin
Created April 16, 2015 01:45
Show Gist options
  • Save mrpunkin/0cc92b756783b81bad37 to your computer and use it in GitHub Desktop.
Save mrpunkin/0cc92b756783b81bad37 to your computer and use it in GitHub Desktop.
def [](attr_name)
instance_variable_get("@#{attr_name}") || super(attr_name)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment