Skip to content

Instantly share code, notes, and snippets.

@chrisb
Created July 7, 2011 01:27
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 chrisb/1068734 to your computer and use it in GitHub Desktop.
Save chrisb/1068734 to your computer and use it in GitHub Desktop.
class Rapper
attr_accessor :name
def initialize(n)
self.name = n
end
def rap(words)
puts "Yo yo yo, my name is #{self.name}"
puts words
end
end
lilwayne = Rapper.new("Lil' Wayne")
lilwayne.rap("and I'm the greatest rapper alive!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment