Class: Utils::Terminal
- Inherits:
-
Object
- Object
- Utils::Terminal
- Defined in:
- lib/tic_tac_toe/utils/terminal.rb
Class Method Summary collapse
Class Method Details
.clear_screen ⇒ Object
4 5 6 |
# File 'lib/tic_tac_toe/utils/terminal.rb', line 4 def clear_screen system('clear') || system('cls') end |
.get_input ⇒ Object
8 9 10 11 12 |
# File 'lib/tic_tac_toe/utils/terminal.rb', line 8 def get_input val = gets.chomp val end |
.get_integer_input ⇒ Object
14 15 16 |
# File 'lib/tic_tac_toe/utils/terminal.rb', line 14 def get_integer_input get_input.to_i end |