Class: Marionetta::DirectorySync
- Inherits:
-
Object
- Object
- Marionetta::DirectorySync
- Includes:
- Commandable
- Defined in:
- lib/marionetta/directory_sync.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(server) ⇒ DirectorySync
constructor
A new instance of DirectorySync.
- #sync(from, to, options = {}) ⇒ Object
Constructor Details
#initialize(server) ⇒ DirectorySync
Returns a new instance of DirectorySync.
11 12 13 |
# File 'lib/marionetta/directory_sync.rb', line 11 def initialize(server) @server = server end |
Class Method Details
.sync(server, from, to, options = {}) ⇒ Object
7 8 9 |
# File 'lib/marionetta/directory_sync.rb', line 7 def self.sync(server, from, to, = {}) new(server).sync(from, to, ) end |
Instance Method Details
#sync(from, to, options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/marionetta/directory_sync.rb', line 15 def sync(from, to, = {}) create_dir(to) if .has_key?(:exclude) excludes = [:exclude] else excludes = [] end sync_dir(from, to, excludes) end |