Method: Keybox::Application::PasswordSafe#delete

Defined in:
lib/keybox/application/password_safe.rb

#delete(account) ⇒ Object

delete an entry from the database



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/keybox/application/password_safe.rb', line 281

def delete()
    matches = @db.find()
    count = 0
    matches.each do |match|
        hsay "-" * 40, :separator_bar
        hsay match, :normal
        hsay "-" * 40, :separator_bar

        if hagree "Delete this entry (y/n) ?" then
            @db.delete(match)
            count += 1
        end
    end
    hsay "#{count} records matching '#{account}' deleted.", :information
end