1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
class Level def initialize(&block) @interfaces = [] @description = "" @count = 0 @clicks = 3 self.instance_eval(&block) end attr_reader :description, :clicks def interfaces (["Interfaces:"] + @@interfaces).join("\n ") end end