Skip to content

Instantly share code, notes, and snippets.

@joseluistorres
Created September 17, 2013 16:30
Show Gist options
  • Save joseluistorres/6596832 to your computer and use it in GitHub Desktop.
Save joseluistorres/6596832 to your computer and use it in GitHub Desktop.
Administrando dependencias
class Lluvia
def initialize(intensidad)
@intensidad = intensidad
end
def empieza_lluvia
puts "=============LLUVIA==========="
end
end
class Huracan
def initialize(lat, lon, mucha_lluvia, derrumbes)
@lat = lat
@lon = lon
@mucha_lluvia = mucha_lluvia
@derrumbes = derrumbes
end
def empezar_desastre
Lluvia.new(100).empieza_lluvia if mucha_lluvia
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment