Created
June 15, 2014 09:20
-
-
Save anonymous/fae2335b2f74f61e5ee7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1] pry(main)> class MyThing | |
[1] pry(main)* def thingy | |
[1] pry(main)* @@thingy = Struct.new(:key_one, :key_two) | |
[1] pry(main)* @@thingy.new(key_one = 'stuff', key_two = 'more_stuff') | |
[1] pry(main)* end | |
[1] pry(main)* end | |
=> :thingy | |
[2] pry(main)> def example_thing | |
[2] pry(main)* t = MyThing.new | |
[2] pry(main)* t.thingy | |
[2] pry(main)* end | |
=> :example_thing | |
[3] pry(main)> example_thing | |
=> #<struct key_one="stuff", key_two="more_stuff"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment