Class: DockerRailsProxy::Rsync::Sync
- Inherits:
-
Object
- Object
- DockerRailsProxy::Rsync::Sync
- Defined in:
- lib/docker_rails_proxy/concerns/rsync.rb
Instance Attribute Summary collapse
-
#rsync_host ⇒ Object
readonly
Returns the value of attribute rsync_host.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rsync_host:) ⇒ Sync
constructor
A new instance of Sync.
- #sync(options) ⇒ Object
Constructor Details
#initialize(rsync_host:) ⇒ Sync
Returns a new instance of Sync.
53 54 55 |
# File 'lib/docker_rails_proxy/concerns/rsync.rb', line 53 def initialize(rsync_host:) @rsync_host = rsync_host end |
Instance Attribute Details
#rsync_host ⇒ Object (readonly)
Returns the value of attribute rsync_host.
51 52 53 |
# File 'lib/docker_rails_proxy/concerns/rsync.rb', line 51 def rsync_host @rsync_host end |
Class Method Details
.call(rsync_host:, **options) ⇒ Object
57 58 59 |
# File 'lib/docker_rails_proxy/concerns/rsync.rb', line 57 def self.call(rsync_host:, **) new(rsync_host: rsync_host).sync() end |
Instance Method Details
#sync(options) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/docker_rails_proxy/concerns/rsync.rb', line 61 def sync() source, target, volume = () result = send "sync_#{volume}", source: source, target: target if result && [:silent].eql?(false) puts "#{source} =======> #{target}" end result end |