Class: Rustic::CommandBuilder
- Inherits:
-
Object
- Object
- Rustic::CommandBuilder
- Defined in:
- lib/rustic/command_builder.rb
Defined Under Namespace
Classes: MalformedConfigError, MissingConfigError, UnknownCommandError, UnknownPasswordMethodError
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(command, config) ⇒ CommandBuilder
constructor
A new instance of CommandBuilder.
Constructor Details
#initialize(command, config) ⇒ CommandBuilder
Returns a new instance of CommandBuilder.
9 10 11 12 |
# File 'lib/rustic/command_builder.rb', line 9 def initialize(command, config) @command = command @config = config end |
Instance Method Details
#build ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rustic/command_builder.rb', line 14 def build @args = [] @env_variables = {} add_repository_path! add_password! config = add_command! [[@config.restic_path, *@args], @env_variables, config] # TODO: properly handle spaces in paths end |