Created
March 27, 2015 16:03
-
-
Save todd-a-jacobs/86c13baea5b5a7078ef1 to your computer and use it in GitHub Desktop.
Helping out William with question posted on Facebook at https://www.facebook.com/groups/2221017023/permalink/10152617269302024/
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
class Animal | |
# Use an instance method instead of a getter/setter. | |
def make_noise sound | |
p sound | |
end | |
end | |
cow = Animal.new | |
cow.make_noise "Moo!" | |
#=> "Moo!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment