Skip to content

Instantly share code, notes, and snippets.

@xenda
Created February 15, 2011 01:14
Show Gist options
  • Select an option

  • Save xenda/826918 to your computer and use it in GitHub Desktop.

Select an option

Save xenda/826918 to your computer and use it in GitHub Desktop.
class Refrigeradora
def initialize
@comida = []
end
def comida
@comida
end
def +(objeto)
@comida << objeto
end
end
class Leche
end
class Queso
end
class Agua
end
refri = Refrigeradora.new
leche = Leche.new
queso = Queso.new
agua = Agua.new
refri +leche
refri + queso
refri + agua
puts refri.comida
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment