Ask coding questions

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

Hi,

i am new to repl.it 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
Commentshotnewtop
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)

@theangryepicbanana
Apparently this method only work on my terminal but won't work on repl.it
thank you