mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-20 01:50:04 +00:00
add comment
This commit is contained in:
parent
59c91bfb8f
commit
bca86d4c06
1 changed files with 5 additions and 3 deletions
|
@ -16,6 +16,8 @@ module MPW
|
||||||
|
|
||||||
attr_accessor :error_msg
|
attr_accessor :error_msg
|
||||||
|
|
||||||
|
# Constructor
|
||||||
|
# raise an exception if there is a bad parameter
|
||||||
def initialize(config, local, password=nil)
|
def initialize(config, local, password=nil)
|
||||||
@error_msg = nil
|
@error_msg = nil
|
||||||
@config = config
|
@config = config
|
||||||
|
@ -25,6 +27,8 @@ module MPW
|
||||||
raise I18n.t('error.class') if not @local.instance_of?(MPW)
|
raise I18n.t('error.class') if not @local.instance_of?(MPW)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Get the data on remote host
|
||||||
|
# @rtrn: true if get the date, else false
|
||||||
def get_remote
|
def get_remote
|
||||||
case @config.sync_type
|
case @config.sync_type
|
||||||
when 'mpw'
|
when 'mpw'
|
||||||
|
@ -62,9 +66,7 @@ module MPW
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sync remote data and local data
|
# Sync remote data and local data
|
||||||
# @args: data_remote -> array with the data remote
|
# raise an exception if there is a problem
|
||||||
# last_update -> last update
|
|
||||||
# @rtrn: false if data_remote is nil
|
|
||||||
def sync
|
def sync
|
||||||
if not @remote.to_s.empty?
|
if not @remote.to_s.empty?
|
||||||
@local.list.each do |item|
|
@local.list.each do |item|
|
||||||
|
|
Loading…
Add table
Reference in a new issue