Class: CcSecureInput
- Defined in:
- lib/flex_cocoa/cc_secure_input.rb
Instance Attribute Summary
Attributes inherited from FlexCocoa
Instance Method Summary collapse
-
#initialize(title, question, prompt = '', cancel = false) ⇒ CcSecureInput
constructor
A new instance of CcSecureInput.
Methods inherited from FlexCocoa
#button_response, #buttons_template, #parts_init, #post_initialize, set_path
Constructor Details
#initialize(title, question, prompt = '', cancel = false) ⇒ CcSecureInput
Returns a new instance of CcSecureInput.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/flex_cocoa/cc_secure_input.rb', line 9 def initialize (title, question, prompt = '', cancel = false) super() if cancel ('inputbox', title, prompt, question, 'Cancel', 'Ok', nil) else ('inputbox', title, prompt, question, 'Ok', nil, nil) end @exec << " --no-show" post_initialize response = @stdout.read.strip.split("\n") @output = {button: response[0], response: response[1]} end |