private :new
то выдает ошибку `private': undefined method `new' for class `Point3D'class Point3D < Point
def initialize(x, y, z)
super(x, y)
@z = z
end
def self.fabric(x,y,z)
new(x,y,z)
end
private_class_method :new # если заменить на private :new
end
po1 = Point3D.fabric 4,6,5
p po1