Sha256: eaf1c05a065ed8c7b272d85f5ebfbc4885e0f51d72257f341e792fdc30e45323
Contents?: true
Size: 409 Bytes
Versions: 1
Compression:
Stored size: 409 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.4.2-java | examples/lib/shape_system.rb |