Created
May 23, 2011 23:50
-
-
Save raywu/987887 to your computer and use it in GitHub Desktop.
Snuggs's HW: new class
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 Cigs | |
def initialize(brand = "Cigarettes") | |
@brand = brand | |
end | |
def light | |
puts "I'm lighting up a #{@brand}." | |
end | |
def smoke | |
puts "#{@brand} tastes great!" | |
end | |
def kill | |
puts "Where can I throw this #{@brand}?" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment