If you want something that is vaguely portable you can try:
system "clear" || system "cls"
which will try both clear
and cls
More Related Contents:
- Reassigning the value of variables in Ruby?
- What is attr_accessor in Ruby?
- How to get the name of the calling method?
- Why is `a = a` `nil` in Ruby?
- Cannot call non W3C standard command while in W3C mode (Selenium::WebDriver::Error::UnknownCommandError) with Selenium ChromeDriver in Cucumber Ruby
- What is the difference between Ruby 1.8 and Ruby 1.9
- Ruby’s File.open and the need for f.close
- Is there a reason that we cannot iterate on “reverse Range” in ruby?
- Difference between map and collect in Ruby?
- How does “(1..4).inject(&:+)” work in Ruby
- Is sort in Ruby stable?
- How to check whether a string contains a substring in Ruby
- Open an IO stream from a local file or url
- Installing RubyGems in Windows
- Ruby max integer
- How to get a specific output iterating a hash in Ruby?
- Is there an inverse ‘member?’ method in ruby?
- Iterate through every file in one directory
- Passing a method as a parameter in Ruby
- What does “
- Interpolating a string into a regex
- Ruby: Installing rmagick on Ubuntu
- List comprehension in Ruby
- Better ruby markdown interpreter?
- How to understand the difference between class_eval() and instance_eval()?
- What is the best way to split a string to get all the substrings by Ruby?
- Insert digital signature into existing pdf file
- Understanding Ruby and OS I/O buffering
- Rake “already initialized constant WFKV_” warning
- Read and write YAML files without destroying anchors and aliases?