Class: Palaver::PasswordBox
Instance Method Summary collapse
-
#initialize(options) ⇒ PasswordBox
constructor
A new instance of PasswordBox.
- #show ⇒ Object
Methods inherited from Base
#height, #text, #width, #with_tempfile
Constructor Details
#initialize(options) ⇒ PasswordBox
Returns a new instance of PasswordBox.
6 7 8 |
# File 'lib/palaver/passwordbox.rb', line 6 def initialize() super() end |
Instance Method Details
#show ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/palaver/passwordbox.rb', line 10 def show answer = nil with_tempfile do |fname| cmd = "dialog #@common_options --passwordbox '#@text' #@height #@width 2> #{fname}" success = system cmd if success then answer = File.read(fname) end end return answer end |