Created
April 27, 2016 16:06
-
-
Save joshuajhun/b0409c68fbbc9e830fd41640b5cbc40c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Pokemon | |
attr_reader :yung_name | |
def initialize(name) | |
@yung_name = name | |
end | |
def sleeping(time) | |
sleep(time) | |
"#{yung_name} fell asleep for #{time} seconds!" | |
end | |
end | |
snorlax = Pokemon.new('snorlax') | |
snorlax.sleep(5) | |
#=> "snorlax fell asleep for 5 seconds!" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment