Created
November 13, 2015 00:50
-
-
Save kkchu791/b4e0a00f0beda7e4284f 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
#Write a class called Person that has balance as an instance variable and make it readable via an accessor. | |
class Person | |
attr_reader :balance | |
def initialize | |
@balance = 400 | |
end | |
end | |
Tom = Person.new | |
p Tom.balance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment