Code Samples From "Programming Ruby" That Made Me Stop, Look Up At the Ceiling, and Sigh Longingly (Part 2)

CHAPTER 4. CONTAINERS, BLOCKS, AND ITERATORS

PAGE 49

def with_title(title)

  @songs.find {|song| title == song.name }

end

0 comments :