Class: Security::GenericPassword
Instance Attribute Summary
Attributes inherited from Password
#attributes, #keychain, #password
Class Method Summary
collapse
Methods inherited from Password
#initialize
Class Method Details
.add(service, account, password, options = {}) ⇒ Object
52
53
54
55
56
57
58
|
# File 'lib/security/password.rb', line 52
def add(service, account, password, options = {})
options[:a] = account
options[:s] = service
options[:w] = password
system "security add-generic-password #{flags_for_options(options)}"
end
|
.delete(options) ⇒ Object
64
65
66
|
# File 'lib/security/password.rb', line 64
def delete(options)
system "security delete-generic-password #{flags_for_options(options)}"
end
|
.find(options) ⇒ Object
60
61
62
|
# File 'lib/security/password.rb', line 60
def find(options)
password_from_output(`security 2>&1 find-generic-password -g #{flags_for_options(options)}`)
end
|