Class: Rustic::Configs::Backup

Inherits:
Object
  • Object
show all
Includes:
HooksExt
Defined in:
lib/rustic/configs/backup.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HooksExt

#after, #before

Constructor Details

#initializeBackup

Returns a new instance of Backup.



8
9
10
11
12
# File 'lib/rustic/configs/backup.rb', line 8

def initialize
  @paths = []
  @excluded_paths = []
  @one_fs = false
end

Instance Attribute Details

#excluded_pathsObject (readonly)

Returns the value of attribute excluded_paths.



6
7
8
# File 'lib/rustic/configs/backup.rb', line 6

def excluded_paths
  @excluded_paths
end

#one_fsObject (readonly)

Returns the value of attribute one_fs.



6
7
8
# File 'lib/rustic/configs/backup.rb', line 6

def one_fs
  @one_fs
end

#pathsObject (readonly)

Returns the value of attribute paths.



6
7
8
# File 'lib/rustic/configs/backup.rb', line 6

def paths
  @paths
end

Instance Method Details

#backup(*paths) ⇒ Object

Raises:

  • (ArgumentError)


14
15
16
17
18
# File 'lib/rustic/configs/backup.rb', line 14

def backup(*paths)
  raise ArgumentError if paths.empty?

  @paths = paths
end

#exclude(*paths) ⇒ Object

Raises:

  • (ArgumentError)


20
21
22
23
24
# File 'lib/rustic/configs/backup.rb', line 20

def exclude(*paths)
  raise ArgumentError if paths.empty?

  @excluded_paths = paths
end

#one_fs!Object



26
# File 'lib/rustic/configs/backup.rb', line 26

def one_fs! = @one_fs = true