Ask coding questions

← Back to all posts
clear console ruby
Ichenn92 (1)


i am new to and i wish to do a little game to train OOP.
Unfortunately I don't understand how to clear the console with ruby.

Any suggestions ?

thank you so much

Answered by PDanielY (983) [earned 5 cycles]
View Answer
PDanielY (983)

There is not a replit module in ruby, It is only in python.

Ichenn92 (1)

@PDanielY That explain a lot ! thank you !

theangryepicbanana (1636)

Try doing print "\e[2J\e[H"

Ichenn92 (1)

Apparently this method only work on my terminal but won't work on
thank you