1 2 3 4 5 6 7 8 9 10 11 12 13
require 'ruby2d' # Set the window size set width: 300, height: 200 # Create a new shape s = Square.new # Give it some color s.color = 'red' # Show the window show