1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2025-02-17 08:30:04 +00:00

add comment

This commit is contained in:
nishiki 2015-02-13 19:28:59 +01:00
parent 59c91bfb8f
commit bca86d4c06

View file

@ -16,6 +16,8 @@ module MPW
attr_accessor :error_msg
# Constructor
# raise an exception if there is a bad parameter
def initialize(config, local, password=nil)
@error_msg = nil
@config = config
@ -25,6 +27,8 @@ module MPW
raise I18n.t('error.class') if not @local.instance_of?(MPW)
end
# Get the data on remote host
# @rtrn: true if get the date, else false
def get_remote
case @config.sync_type
when 'mpw'
@ -62,9 +66,7 @@ module MPW
end
# Sync remote data and local data
# @args: data_remote -> array with the data remote
# last_update -> last update
# @rtrn: false if data_remote is nil
# raise an exception if there is a problem
def sync
if not @remote.to_s.empty?
@local.list.each do |item|