Class: DInstaller::LuksActivationQuestion
- Defined in:
- lib/dinstaller/luks_activation_question.rb
Overview
This class represent a question to ask whether to activate a LUKS device
Clients have to answer one of these options:
* skip: to skip the activation of the LUKS device
* decrypt: to activate the device using the provided password
Instance Attribute Summary collapse
-
#attempt ⇒ Integer
readonly
Current attempt to decrypt the device.
-
#password ⇒ String?
Password to activate the LUKS device.
Attributes inherited from Question
#answer, #default_option, #id, #options, #text
Instance Method Summary collapse
-
#initialize(device, label: nil, size: nil, attempt: 1) ⇒ LuksActivationQuestion
constructor
Constructor.
Methods inherited from Question
Constructor Details
#initialize(device, label: nil, size: nil, attempt: 1) ⇒ LuksActivationQuestion
Constructor
49 50 51 52 53 54 55 56 |
# File 'lib/dinstaller/luks_activation_question.rb', line 49 def initialize(device, label: nil, size: nil, attempt: 1) @device = device @label = label @size = size @attempt = attempt super(generate_text, options: [:skip, :decrypt]) end |
Instance Attribute Details
#attempt ⇒ Integer (readonly)
Current attempt to decrypt the device
42 43 44 |
# File 'lib/dinstaller/luks_activation_question.rb', line 42 def attempt @attempt end |
#password ⇒ String?
Password to activate the LUKS device
61 62 63 |
# File 'lib/dinstaller/luks_activation_question.rb', line 61 def password @password end |