oop/test/repr.rb

tests/_examples/oop/test/repr.rb in the metorex repository.

class Point
  def initialize
    @x = 0
  end

  def inspect
    "Point(0, 0)"
  end
end

point = Point.new
p point

Output:

Point(0, 0)