Class: Backup::RemoteArchive::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/backup/remote_archive.rb

Overview

DSL for RemoteArchive

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ DSL

Returns a new instance of DSL.



226
227
228
# File 'lib/backup/remote_archive.rb', line 226

def initialize(options)
  @options = options
end

Instance Method Details

#add(path) ⇒ Object



252
253
254
# File 'lib/backup/remote_archive.rb', line 252

def add(path)
  @options[:paths] << path
end

#exclude(path) ⇒ Object



256
257
258
# File 'lib/backup/remote_archive.rb', line 256

def exclude(path)
  @options[:excludes] << path
end

#root(path) ⇒ Object



248
249
250
# File 'lib/backup/remote_archive.rb', line 248

def root(path)
  @options[:root] = path
end

#server_host=(val = true) ⇒ Object

remote server



232
233
234
# File 'lib/backup/remote_archive.rb', line 232

def server_host=(val = true)
  @options[:server_host] = val
end

#server_ssh_password=(val = true) ⇒ Object



239
240
241
# File 'lib/backup/remote_archive.rb', line 239

def server_ssh_password=(val = true)
  @options[:server_ssh_password] = val
end

#server_ssh_user=(val = true) ⇒ Object



236
237
238
# File 'lib/backup/remote_archive.rb', line 236

def server_ssh_user=(val = true)
  @options[:server_ssh_user] = val
end

#tar_options(opts) ⇒ Object



260
261
262
# File 'lib/backup/remote_archive.rb', line 260

def tar_options(opts)
  @options[:tar_options] = opts
end

#use_sudo(val = true) ⇒ Object



244
245
246
# File 'lib/backup/remote_archive.rb', line 244

def use_sudo(val = true)
  @options[:sudo] = val
end