Skip to content

Instantly share code, notes, and snippets.

@stanigator
Created May 15, 2012 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stanigator/f91e5794a654eee69ad6 to your computer and use it in GitHub Desktop.
Save stanigator/f91e5794a654eee69ad6 to your computer and use it in GitHub Desktop.
Song
class Song
def initialize(name = "John", artist = "Albert", duration=20)
@name = name
@artist = artist
@duration = duration
end
def to_s
"Song: #{@name}--#{@artist} (#{@duration})"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment