Class: Pvectl::Wizards::CreateContainer
- Inherits:
-
Object
- Object
- Pvectl::Wizards::CreateContainer
- Defined in:
- lib/pvectl/wizards/create_container.rb
Overview
Interactive wizard for creating an LXC container step by step.
Uses TTY::Prompt (when available) or a fallback prompt to guide the user through container configuration. Returns a normalized params hash compatible with Services::CreateContainer, or nil if the user cancels.
Instance Method Summary collapse
-
#initialize(options, global_options, prompt: nil) ⇒ CreateContainer
constructor
Creates a new CreateContainer wizard.
-
#run ⇒ Hash?
Runs the wizard and returns params or nil if cancelled.
Constructor Details
#initialize(options, global_options, prompt: nil) ⇒ CreateContainer
Creates a new CreateContainer wizard.
22 23 24 25 26 |
# File 'lib/pvectl/wizards/create_container.rb', line 22 def initialize(, , prompt: nil) @options = @global_options = @prompt = prompt || create_default_prompt end |
Instance Method Details
#run ⇒ Hash?
Runs the wizard and returns params or nil if cancelled.
31 32 33 |
# File 'lib/pvectl/wizards/create_container.rb', line 31 def run collect_params end |