Module: DInstaller::DBus::Question::Interfaces::LuksActivation

Defined in:
lib/dinstaller/dbus/question.rb

Overview

Interface to provide information when activating a LUKS device

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



136
137
138
139
140
141
142
143
# File 'lib/dinstaller/dbus/question.rb', line 136

def self.included(base)
  base.class_eval do
    dbus_interface LUKS_ACTIVATION_INTERFACE do
      dbus_accessor :luks_password, "s", dbus_name: "Password"
      dbus_reader :activation_attempt, "u", dbus_name: "Attempt"
    end
  end
end

Instance Method Details

#activation_attemptInteger

Current attempt for activating the device

Returns:

  • (Integer)


132
133
134
# File 'lib/dinstaller/dbus/question.rb', line 132

def activation_attempt
  backend.attempt
end

#backendDInstaller::Question

Note:

Classes including this mixin must define a #backend method



# File 'lib/dinstaller/dbus/question.rb', line 111

#luks_passwordString

Given password

Returns:

  • (String)


118
119
120
# File 'lib/dinstaller/dbus/question.rb', line 118

def luks_password
  backend.password || ""
end

#luks_password=(value) ⇒ Object

Sets a password

Parameters:

  • value (String)


125
126
127
# File 'lib/dinstaller/dbus/question.rb', line 125

def luks_password=(value)
  backend.password = value
end