1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-23 13:57:52 +00:00

change array.new

This commit is contained in:
nishiki 2014-02-01 00:09:22 +01:00
parent 958792801e
commit 1f5b37ed3c
2 changed files with 6 additions and 6 deletions

View file

@ -78,7 +78,7 @@ module MPW
# protocol -> the connection protocol (ssh, web, other)
# @rtrn: a list with the resultat of the search
def search(search='', group=nil, protocol=nil)
result = Array.new()
result = []
if !search.nil?
search = search.downcase
@ -110,7 +110,7 @@ module MPW
end
end
return Array.new()
return []
end
# Update an item
@ -125,7 +125,7 @@ module MPW
# comment -> a comment
# @rtrn: true if the item has been updated
def update(name, group, server, protocol, login, passwd, port, comment, id=nil)
row = Array.new()
row = []
update = false
i = 0
@ -142,7 +142,7 @@ module MPW
port = nil
end
row_update = Array.new()
row_update = []
row_update[DATE] = Time.now.to_i
row_update[ID] = id.nil? || id.empty? ? MPW.password(16) : id
@ -238,7 +238,7 @@ module MPW
# @args: file -> path to file import
# @rtrn: an array with the items to import, if there is an error return false
def import_preview(file)
result = Array.new()
result = []
id = 0
data = IO.read(file)

View file

@ -165,7 +165,7 @@ class Cli
# Form to add a new item
def add()
row = Array.new()
row = []
puts I18n.t('form.add.title')
puts '--------------------'
name = ask(I18n.t('form.add.name')).to_s