class Point
attr_reader :x, :y
def initialize(x,y)
@x, @y = x, y
end
endPoint.new 24, -33 # … Point.new -75, 64 # … Point.new 40, -63 # … Point.new 47, -78 # … Point.new -91, 65
class Numeric
def at(y)
Point.new self, y
end
end24.at(-33) # … -75.at(64) # … 40.at(-63) # … 47.at(-78) # … -91.at(65)
