结构(记录)

ColorPoint = Struct.new(:x, :y) do
    attr_accessor :color
end

colorPoint = ColorPoint.new(00)
colorPoint.color = "red"

puts "color is '#{colorPoint.color}'"