Class: Assumption::CLI
- Inherits:
-
Object
- Object
- Assumption::CLI
- Includes:
- UniFunctions
- Defined in:
- lib/assumption/cli.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
Returns the value of attribute input.
Instance Method Summary collapse
Methods included from UniFunctions
#clear_terminal, #get_char, #title, #underline
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input.
5 6 7 |
# File 'lib/assumption/cli.rb', line 5 def input @input end |
Instance Method Details
#begin ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/assumption/cli.rb', line 13 def begin puts 'Type the chart year you would like to play between 1954-2019' year_input puts 'Would you like to play again? (y/n)' get_char @input == 'y' ? start_sequence : exit end |
#start_sequence ⇒ Object
7 8 9 10 11 |
# File 'lib/assumption/cli.rb', line 7 def start_sequence clear_terminal title self.begin end |