fe2c1c6eb6 | ||
---|---|---|
.. | ||
readme.md |
readme.md
Lösung: Mixin benutzen
def initialize(max) @max = max end
def each for i in 1..@max yield i ** 2 end end end
s = Squares.new(20) s.each { |e| puts e } s.first