mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-27 15:43:04 +00:00
fix indent
This commit is contained in:
parent
e7c03269a6
commit
c04fa3af94
1 changed files with 5 additions and 5 deletions
10
lib/MPW.rb
10
lib/MPW.rb
|
@ -176,12 +176,12 @@ module MPW
|
||||||
def export(file, type=:yaml)
|
def export(file, type=:yaml)
|
||||||
case type
|
case type
|
||||||
when :csv
|
when :csv
|
||||||
CSV.open(file, 'w', write_headers: true,
|
CSV.open(file, 'w', write_headers: true,
|
||||||
headers: ['name', 'group', 'protocol', 'host', 'login', 'password', 'port', 'comment']) do |csv|
|
headers: ['name', 'group', 'protocol', 'host', 'login', 'password', 'port', 'comment']) do |csv|
|
||||||
@data.each do |id, r|
|
@data.each do |id, r|
|
||||||
csv << [r['name'], r['group'], r['protocol'], r['host'], r['login'], r['password'], r['port'], r['comment']]
|
csv << [r['name'], r['group'], r['protocol'], r['host'], r['login'], r['password'], r['port'], r['comment']]
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
when :yaml
|
when :yaml
|
||||||
File.open(file, 'w') {|f| f << @data.to_yaml}
|
File.open(file, 'w') {|f| f << @data.to_yaml}
|
||||||
|
|
Loading…
Reference in a new issue