I mean getter/setter methods. I don't really see the reason why they are needed.
class Book
def initialize(title)
@title = title
end
def title
@title
end
def title=(title)
@title = title
end
end
Could someone be so nice and describe me exactly what is going on, and if so please do it without using some fancy words.
Thanks a lot!
Subscribe to:
Post Comments (Atom)
OK! I do get it now. I Googled a little bit and after readeing some other explenations I got it. :)
ReplyDelete