Created
August 15, 2015 02:27
-
-
Save rachaelsalter/899243e839b56ca1f149 to your computer and use it in GitHub Desktop.
This file contains 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 PBJ | |
attr_accessor :pbutter, :jelly | |
def initialize(pbutter, jelly) | |
@pbutter = pbutter | |
@jelly = jelly | |
end | |
def make | |
puts "Spread #{@pbutter} peanut butter and #{@jelly} jelly on bread. Bam!" | |
end | |
end | |
sandwhich = PBJ.new(:crunchy, :strawberry) | |
sandwhich.jelly = :apricot | |
sandwhich.make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment