class Pwl::Dialog::SystemDialog

Base class for dialogs implemented by executing a system command.

Public Instance Methods

command() click to toggle source
# File lib/pwl/dialog/base.rb, line 32
def command
  raise "Not implemented. A derived class is expected to provide the OS command for prompting a password."
end
get_input() click to toggle source
# File lib/pwl/dialog/base.rb, line 26
def get_input
  out, err, rc = Open3.capture3(command)
  raise Cancelled.new(rc.exitstatus) unless 0 == rc.exitstatus
  out.chomp
end