class Rustic::Config
Attributes
backup_config[R]
check_config[R]
forget_config[R]
restic_path[R]
strict_validation[R]
Public Class Methods
new()
click to toggle source
# File lib/rustic/config.rb, line 8 def initialize @restic_path = "restic" @strict_validation = false end
Public Instance Methods
backup(&block)
click to toggle source
# File lib/rustic/config.rb, line 41 def backup(&block) @backup_config ||= Rustic::Configs::Backup.new @backup_config.instance_eval(&block) end
check(&block)
click to toggle source
# File lib/rustic/config.rb, line 46 def check(&block) @check_config ||= Rustic::Configs::Check.new @check_config.instance_eval(&block) unless block.nil? end
forget(&block)
click to toggle source
# File lib/rustic/config.rb, line 51 def forget(&block) @forget_config ||= Rustic::Configs::Forget.new @forget_config.instance_eval(&block) end
on_error(&block)
click to toggle source
# File lib/rustic/config.rb, line 35 def on_error(&block) return @on_error if block.nil? @on_error = block end
password(password = nil)
click to toggle source
# File lib/rustic/config.rb, line 23 def password(password = nil) return @password if password.nil? @password = password end
password_file(password_file = nil)
click to toggle source
# File lib/rustic/config.rb, line 29 def password_file(password_file = nil) return @password_file if password_file.nil? @password_file = password_file end
repository(path = nil)
click to toggle source
# File lib/rustic/config.rb, line 17 def repository(path = nil) return @path if path.nil? @path = path end
restic(path)
click to toggle source
# File lib/rustic/config.rb, line 13 def restic(path) @restic_path = path end
strict_validation!(= @strict_validation = true)
click to toggle source
# File lib/rustic/config.rb, line 56 def strict_validation! = @strict_validation = true end