Class: Rustic::Configs::Backup
- Inherits:
-
Object
- Object
- Rustic::Configs::Backup
- Includes:
- HooksExt
- Defined in:
- lib/rustic/configs/backup.rb
Instance Attribute Summary collapse
-
#compression_mode ⇒ Object
readonly
Returns the value of attribute compression_mode.
-
#excluded_paths ⇒ Object
readonly
Returns the value of attribute excluded_paths.
-
#one_fs ⇒ Object
readonly
Returns the value of attribute one_fs.
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
Instance Method Summary collapse
- #backup(*paths) ⇒ Object
- #compression(value) ⇒ Object
- #exclude(*paths) ⇒ Object
-
#initialize ⇒ Backup
constructor
A new instance of Backup.
- #one_fs! ⇒ Object
Methods included from HooksExt
Constructor Details
#initialize ⇒ Backup
Returns a new instance of Backup.
8 9 10 11 12 13 |
# File 'lib/rustic/configs/backup.rb', line 8 def initialize @paths = [] @excluded_paths = [] @one_fs = false @compression_mode = "auto" end |
Instance Attribute Details
#compression_mode ⇒ Object (readonly)
Returns the value of attribute compression_mode.
6 7 8 |
# File 'lib/rustic/configs/backup.rb', line 6 def compression_mode @compression_mode end |
#excluded_paths ⇒ Object (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_fs ⇒ Object (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 |
#paths ⇒ Object (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
15 16 17 18 19 |
# File 'lib/rustic/configs/backup.rb', line 15 def backup(*paths) raise ArgumentError if paths.empty? @paths = paths end |
#compression(value) ⇒ Object
29 30 31 |
# File 'lib/rustic/configs/backup.rb', line 29 def compression(value) @compression_mode = value end |
#exclude(*paths) ⇒ Object
21 22 23 24 25 |
# File 'lib/rustic/configs/backup.rb', line 21 def exclude(*paths) raise ArgumentError if paths.empty? @excluded_paths = paths end |
#one_fs! ⇒ Object
27 |
# File 'lib/rustic/configs/backup.rb', line 27 def one_fs! = @one_fs = true |