Sha256: 3cb786d8c11bfd7af7f7cbb023c65ff4737abf907adb70f6ecccd32d213208eb
Contents?: true
Size: 414 Bytes
Versions: 1
Compression:
Stored size: 414 Bytes
Contents
module Runnable def run reject! { |item| item.done } each { |item| item.display } end end class ShapeSystem include Enumerable, Runnable extend Forwardable def_delegators(:@polygons, :each, :reject!, :<<) attr_reader :bd def initialize(bd) @bd = bd @polygons = [] # Initialize the Array end def add_polygon(x, y) self << CustomShape.new(bd, x, y) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pbox2d-0.5.0-java | examples/lib/shape_system.rb |