Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
where does song.name come from?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Morton Goldberg, post: 4541941"] Very much earlier in the book (p. 26 in the PDF version) the class Song was defined as follows: class Song def name @name end def artist @artist end def duration @duration end end That's where 'name' comes from. It's a reader method and it's purpose is to return the value of the instance variable Song::@name. It has nothing to do with the method Module::name. Regards, Morton [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
where does song.name come from?
Top