Created
November 12, 2015 22:32
-
-
Save zenkbaries/61f74e21e205e187a2a2 to your computer and use it in GitHub Desktop.
new class
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 Home | |
attr_accessor :bedroom, :bathroom | |
def initialize(bedroom, bathroom) | |
@bedroom = bedroom | |
@bathroom = bathroom | |
end | |
def bedroom | |
@bedroom | |
end | |
def bathroom | |
@bathroom | |
end | |
end | |
apt = Home.new(2,1) | |
puts apt.bedroom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment