Skip to content

Instantly share code, notes, and snippets.

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