Class: SwarmClusterCliOpe::SyncConfigs::Copy

Inherits:
Base
  • Object
show all
Defined in:
lib/swarm_cluster_cli_ope/sync_configs/copy.rb

Direct Known Subclasses

Sqlite3

Instance Attribute Summary

Attributes inherited from Base

#configs, #service

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from LoggerConcern

#logger

Constructor Details

This class inherits a constructor from SwarmClusterCliOpe::SyncConfigs::Base

Instance Method Details

#local_folderString

Returns:

  • (String)


6
7
8
# File 'lib/swarm_cluster_cli_ope/sync_configs/copy.rb', line 6

def local_folder
  @configs[:configs][:local]
end

#pullTrueClass, FalseClass

Returns:

  • (TrueClass, FalseClass)


21
22
23
# File 'lib/swarm_cluster_cli_ope/sync_configs/copy.rb', line 21

def pull
  say "#{remote_folder} -->> #{local_folder}" if container.copy_out(remote_folder,local_folder)
end

#pushTrueClass, FalseClass

Returns:

  • (TrueClass, FalseClass)


16
17
18
# File 'lib/swarm_cluster_cli_ope/sync_configs/copy.rb', line 16

def push
  say "#{local_folder} -->> #{remote_folder}" if container.copy_in(local_folder,remote_folder)
end

#remote_folderString

Returns:

  • (String)


11
12
13
# File 'lib/swarm_cluster_cli_ope/sync_configs/copy.rb', line 11

def remote_folder
  @configs[:configs][:remote]
end