Class: Markymark::InitWizard
- Inherits:
-
Object
- Object
- Markymark::InitWizard
- Defined in:
- lib/markymark/init_wizard.rb
Overview
Interactive setup wizard for Markymark
Instance Method Summary collapse
-
#initialize(accept_defaults: false) ⇒ InitWizard
constructor
A new instance of InitWizard.
- #run ⇒ Object
Constructor Details
#initialize(accept_defaults: false) ⇒ InitWizard
Returns a new instance of InitWizard.
6 7 8 |
# File 'lib/markymark/init_wizard.rb', line 6 def initialize(accept_defaults: false) @accept_defaults = accept_defaults end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/markymark/init_wizard.rb', line 10 def run puts "Markymark Setup Wizard" puts "=" * 40 puts "" results = { app_installed: false, default_set: false, server_mode: nil } # Step 1: Install macOS app (macOS only) if macos? results[:app_installed] = step_install_app # Step 2: Set as default handler (only if app was installed) if results[:app_installed] results[:default_set] = step_set_default end else puts "Skipping macOS app installation (not on macOS)" puts "" end # Step 3: Server mode setup results[:server_mode] = step_server_mode # Summary print_summary(results) results end |