Class: Security::GenericPassword
- Defined in:
- lib/security/password.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Password
#attributes, #keychain, #password
Class Method Summary collapse
- .add(service, account, password, options = {}) ⇒ Object
- .delete(options) ⇒ Object
- .find(options) ⇒ Object
Methods inherited from Password
Constructor Details
This class inherits a constructor from Security::Password
Class Method Details
.add(service, account, password, options = {}) ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/security/password.rb', line 66 def add(service, account, password, = {}) [:a] = account [:s] = service [:w] = password system "security add-generic-password #{()}" end |
.delete(options) ⇒ Object
78 79 80 |
# File 'lib/security/password.rb', line 78 def delete() system "security delete-generic-password #{()}" end |
.find(options) ⇒ Object
74 75 76 |
# File 'lib/security/password.rb', line 74 def find() password_from_output(`security 2>&1 find-generic-password -g #{()}`) end |