Class: Rosette::CLI
- Inherits:
-
Object
- Object
- Rosette::CLI
- Defined in:
- lib/rosette/cli.rb
Class Attribute Summary collapse
-
.command ⇒ Object
readonly
Returns the value of attribute command.
-
.prompt ⇒ Object
readonly
Returns the value of attribute prompt.
Class Method Summary collapse
Class Attribute Details
.command ⇒ Object (readonly)
Returns the value of attribute command.
10 11 12 |
# File 'lib/rosette/cli.rb', line 10 def command @command end |
.prompt ⇒ Object (readonly)
Returns the value of attribute prompt.
10 11 12 |
# File 'lib/rosette/cli.rb', line 10 def prompt @prompt end |
Class Method Details
.run ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rosette/cli.rb', line 14 def run loop do ask_for_command return exit 0 if exit_cli? next display_help if help? next normalize! if normalize? ask_for_key send command end end |