ruby-uebungen/Assignment_016/solution
Thomas Smits 58bc23516c Update of exercises 2023-05-25 17:49:42 +02:00
..
readme.md Update of exercises 2023-05-25 17:49:42 +02:00

readme.md

Lösung: Geschachtelte Methoden

class Bomb
  def self.activate
    def explode
      puts "Booooommmmm"
    end
  end
end

b1 = Bomb.new
b2 = Bomb.new
b1.explode # Fehler

Bomb::activate
b1.explode
b2.explode