8

Possible Duplicate:
How can I clear the terminal in Ruby?

How to clear the terminal screen in ruby?

puts "hello, what's your name?"
input = gets.chomp
<<clearscreen>>
puts "nice to meet you, #{input}"
braX
  • 11,506
  • 5
  • 20
  • 33
Mr. Demetrius Michael
  • 2,326
  • 5
  • 28
  • 40

1 Answers1

13

Not sure what you're asking exactly, but there are different ways to clear irb / terminal in this post: How Do You Clear The IRB Console?

One that is intersting is

In order to clear the screen just do a

puts "\e[H\e[2J"

Community
  • 1
  • 1
Brett Sanders
  • 813
  • 8
  • 21