Class: Backup::Archive::DSL
- Inherits:
-
Object
- Object
- Backup::Archive::DSL
- Defined in:
- lib/backup/archive.rb
Instance Method Summary collapse
- #add(path) ⇒ Object
- #exclude(path) ⇒ Object
-
#initialize(options) ⇒ DSL
constructor
A new instance of DSL.
- #root(path) ⇒ Object
- #tar_options(opts) ⇒ Object
- #use_sudo(val = true) ⇒ Object
Constructor Details
#initialize(options) ⇒ DSL
Returns a new instance of DSL.
144 145 146 |
# File 'lib/backup/archive.rb', line 144 def initialize() @options = end |
Instance Method Details
#add(path) ⇒ Object
156 157 158 |
# File 'lib/backup/archive.rb', line 156 def add(path) @options[:paths] << path end |
#exclude(path) ⇒ Object
160 161 162 |
# File 'lib/backup/archive.rb', line 160 def exclude(path) @options[:excludes] << path end |
#root(path) ⇒ Object
152 153 154 |
# File 'lib/backup/archive.rb', line 152 def root(path) @options[:root] = path end |
#tar_options(opts) ⇒ Object
164 165 166 |
# File 'lib/backup/archive.rb', line 164 def (opts) @options[:tar_options] = opts end |
#use_sudo(val = true) ⇒ Object
148 149 150 |
# File 'lib/backup/archive.rb', line 148 def use_sudo(val = true) @options[:sudo] = val end |