Class: Pwl::Dialog::SystemDialog
Overview
Base class for dialogs implemented by executing a system command.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Pwl::Dialog::Base
Instance Method Details
#command ⇒ Object
32 33 34 |
# 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 ⇒ Object
26 27 28 29 30 |
# 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 |