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
50
51
52
53
54
55
56
|
# File 'lib/security/password.rb', line 50
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
58
59
60
61
62
|
# File 'lib/security/password.rb', line 58
def find(options)
options[:g] = ''
password_from_output(`security 2>&1 find-generic-password #{flags_for_options(options)}`)
end
|