Skip to content

Instantly share code, notes, and snippets.

@bbhoss
Forked from jkutner/example.rb
Created February 8, 2012 04:31
Show Gist options
  • Save bbhoss/1765453 to your computer and use it in GitHub Desktop.
Save bbhoss/1765453 to your computer and use it in GitHub Desktop.
Possible alternative approach?
class Local
def method_missing(*args)
"hello world"
end
end
def my_val
raise "goodbye cruel world"
end
Local.new.instance_eval { p public_send(:my_val) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment