1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-27 07:33:05 +00:00

fix indent

This commit is contained in:
nishiki 2014-12-29 22:32:36 +01:00
parent e7c03269a6
commit c04fa3af94

View file

@ -176,12 +176,12 @@ module MPW
def export(file, type=:yaml)
case type
when :csv
CSV.open(file, 'w', write_headers: true,
headers: ['name', 'group', 'protocol', 'host', 'login', 'password', 'port', 'comment']) do |csv|
@data.each do |id, r|
csv << [r['name'], r['group'], r['protocol'], r['host'], r['login'], r['password'], r['port'], r['comment']]
end
CSV.open(file, 'w', write_headers: true,
headers: ['name', 'group', 'protocol', 'host', 'login', 'password', 'port', 'comment']) do |csv|
@data.each do |id, r|
csv << [r['name'], r['group'], r['protocol'], r['host'], r['login'], r['password'], r['port'], r['comment']]
end
end
when :yaml
File.open(file, 'w') {|f| f << @data.to_yaml}