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.
58 59 60 |
# File 'lib/docker_rails_proxy/concerns/rsync.rb', line 58 def initialize(rsync_host:) @rsync_host = rsync_host end |
Instance Attribute Details
#rsync_host ⇒ Object (readonly)
Returns the value of attribute rsync_host.
56 57 58 |
# File 'lib/docker_rails_proxy/concerns/rsync.rb', line 56 def rsync_host @rsync_host end |
Class Method Details
.call(rsync_host:, **options) ⇒ Object
62 63 64 |
# File 'lib/docker_rails_proxy/concerns/rsync.rb', line 62 def self.call(rsync_host:, **) new(rsync_host: rsync_host).sync() end |
Instance Method Details
#sync(options) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/docker_rails_proxy/concerns/rsync.rb', line 66 def sync() return if source_in_exclusions?(**) source, target, volume = (**) result = send( "sync_#{volume}", source: source, target: target, reverse: [:reverse] ) if result && [:silent].eql?(false) DockerRailsProxy.logger.info "#{source} =======> #{target}" end result end |