class Rustic::Evaluator
Public Class Methods
new(command, config)
click to toggle source
# File lib/rustic/evaluator.rb, line 6 def initialize(command, config) @command = command @config = config end
Public Instance Methods
evaluate()
click to toggle source
# File lib/rustic/evaluator.rb, line 11 def evaluate with_hooks(@config) do builder = Rustic::CommandBuilder.new(@command, @config) command, env, config = builder.build with_hooks(config) do Rustic::Wrapper.new(command, env).run end end rescue StandardError => e on_error(e) raise end
on_error(error)
click to toggle source
# File lib/rustic/evaluator.rb, line 25 def on_error(error) = @config.on_error&.call(error) def with_hooks(config, args = nil, &block) = Rustic::Hooks.new(config).with_hooks(args, &block)
with_hooks(config, args = nil, &block)
click to toggle source
# File lib/rustic/evaluator.rb, line 26 def with_hooks(config, args = nil, &block) = Rustic::Hooks.new(config).with_hooks(args, &block) end