Last active
August 29, 2015 14:01
-
-
Save jdibiccari/d051c715f2275373e296 to your computer and use it in GitHub Desktop.
blog_post_3
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
Submarine = Struct.new(:captain, :sub_name) do | |
def destination? | |
puts "Headed to the Aquadome" | |
end | |
end | |
scimitar2 = Submarine.new("Lauren", "Scimitar 2") | |
scimitar2.captain | |
#=> Lauren | |
scimitar2.destination? | |
#=> Headed to the Aquadome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment