A quick Ruby Tutorial, Part 2
A quick Ruby Tutorial, Part 2. COMP313 Source: Programming Ruby, The Pragmatic Programmers’ Guide by Dave Thomas, Chad Fowler, and Andy Hunt. Writing attributes. class Song def duration=(new_duration) @duration = new_duration end end song = Song.new("Bicylops", "Fleck", 260)
449 views • 30 slides