module Restic::Service::Targets::B2
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/restic/service/targets/b2.rb, line 18 def initialize(*args) super @bucket = nil @path = nil @id = nil @key = nil end
normalize_yaml(yaml)
click to toggle source
# File lib/restic/service/targets/b2.rb, line 9 def self.normalize_yaml(yaml) %w{bucket path id key}.each do |required_field| if !yaml[required_field] raise Conf::InvalidConfigurationFile, "missing '#{required_field}' field in target" end end yaml end
Public Instance Methods
available?()
click to toggle source
# File lib/restic/service/targets/b2.rb, line 5 def available? true end
setup_from_conf(conf, yaml)
click to toggle source
Calls superclass method
# File lib/restic/service/targets/b2.rb, line 27 def setup_from_conf(conf, yaml) super @bucket = yaml['bucket'] @path = yaml['path'] @id = yaml['id'] @key = yaml['key'] end