Class: ListAction
- Inherits:
-
BaseAction
- Object
- BaseAction
- ListAction
- Defined in:
- lib/lockr/action/list.rb
Instance Method Summary collapse
-
#initialize(keyfile, vault) ⇒ ListAction
constructor
A new instance of ListAction.
Constructor Details
#initialize(keyfile, vault) ⇒ ListAction
Returns a new instance of ListAction.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/lockr/action/list.rb', line 5 def initialize( keyfile, vault) super( keyfile, vault) pwdlist = @pwdmgr.list() out = [] if keyfile.nil? pwdlist.each { |id,value| out << "Id: #{id}" } else pwdlist.each { |oid,site_directory| pwd_directory_id = site_directory pwd_directory_id.each { |username, pwdstore| out << "Id: #{pwdstore.id} / Username: #{pwdstore.username}" } } end out.sort! out.each{ |e| puts e } end |