Class: Wizard
- Inherits:
-
Object
- Object
- Wizard
- Defined in:
- lib/kafo/wizard.rb
Instance Method Summary collapse
-
#initialize ⇒ Wizard
constructor
A new instance of Wizard.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Wizard
Returns a new instance of Wizard.
6 7 8 9 10 11 |
# File 'lib/kafo/wizard.rb', line 6 def initialize setup_terminal setup_colors @name = 'Kafo' @config = KafoConfigure.config end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/kafo/wizard.rb', line 13 def run = "Welcome to the #{@name} installer!" say("<%= color('#{}', :headline) %>") say("<%= color('#{'-' * .size}', :horizontal_line) %>") say(<<END) This wizard will gather all required information. You can change any parameter to your needs. END exit 0 unless agree("\n<%= color('Ready to start?', :question) %> (y/n)", false) end |