#!/usr/bin/ruby class Counter def initialize @count = 0 end def print @count += 1 puts @count end end c = Counter.new for i in 1..5 c.print end