Skip to content

Instantly share code, notes, and snippets.

@deependersingla
Created December 11, 2013 09:44
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 deependersingla/7907673 to your computer and use it in GitHub Desktop.
Save deependersingla/7907673 to your computer and use it in GitHub Desktop.
[2] pry(main)> f = Foo::Bar.new
=> #<Foo::Bar:0x000000032174a8>
[3] pry(main)> $ f.[]
From: (pry) @ line 3:
Owner: Foo::Bar
Visibility: public
Number of lines: 3
def [](key)
"value"
end
[4] pry(main)> $ f[]
From: (pry) @ line 3:
Owner: Foo::Bar
Visibility: public
Number of lines: 3
def [](key)
"value"
end
**********************************************
[7] pry(main)> $ Foo::Bar.new.[]
From: (pry) @ line 3:
Owner: Foo::Bar
Visibility: public
Number of lines: 3
def [](key)
"value"
end
[8] pry(main)> $ Foo::Bar.new[]
From: (pry) @ line 3:
Owner: Foo::Bar
Visibility: public
Number of lines: 3
def [](key)
"value"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment