Class: Security::GenericPassword

Inherits:
Password
  • Object
show all
Defined in:
lib/security/password.rb

Instance Attribute Summary

Attributes inherited from Password

#attributes, #keychain, #password

Class Method Summary collapse

Methods inherited from Password

#initialize

Constructor Details

This class inherits a constructor from Security::Password

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, , password, options = {})
  options[:a] = 
  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