Skip to content

Instantly share code, notes, and snippets.

Created December 28, 2012 13:38
Show Gist options
  • Save anonymous/4397932 to your computer and use it in GitHub Desktop.
Save anonymous/4397932 to your computer and use it in GitHub Desktop.
class Foo
def initialize(hsh = {})
@v = hsh
end
def [:key]
return @v[:key]
end
end
@bar = Foo.new({:k => 'v'})
puts @bar[:k]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment