Class: Security::GenericPassword

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

Overview

:nodoc:

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



66
67
68
69
70
71
72
# File 'lib/security/password.rb', line 66

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



78
79
80
# File 'lib/security/password.rb', line 78

def delete(options)
  system "security delete-generic-password #{flags_for_options(options)}"
end

.find(options) ⇒ Object



74
75
76
# File 'lib/security/password.rb', line 74

def find(options)
  password_from_output(`security 2>&1 find-generic-password -g #{flags_for_options(options)}`)
end