Created
July 7, 2011 01:27
-
-
Save chrisb/1068734 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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