Skip to content

Instantly share code, notes, and snippets.

@chrisb
Created Jul 7, 2011
Embed
What would you like to do?
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