Skip to content

Instantly share code, notes, and snippets.

@keithrbennett
Created February 18, 2009 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithrbennett/66565 to your computer and use it in GitHub Desktop.
Save keithrbennett/66565 to your computer and use it in GitHub Desktop.
class A
def initialize
@foo = 123
end
def method_missing(name)
instance_variable_get "@#{name}"
end
end
puts A.new.foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment