Class: Restic::Service::Targets::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/restic/service/targets/base.rb

Direct Known Subclasses

RcloneB2, Restic

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Base



7
8
9
10
11
# File 'lib/restic/service/targets/base.rb', line 7

def initialize(name)
    @name = name

    @bandwidth_limit = nil
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/restic/service/targets/base.rb', line 5

def name
  @name
end

Instance Method Details

#setup_from_conf(conf, yaml) ⇒ Object



13
14
15
16
17
18
# File 'lib/restic/service/targets/base.rb', line 13

def setup_from_conf(conf, yaml)
    @bandwidth_limit =
        if limit = yaml.fetch('bandwidth_limit', conf.bandwidth_limit)
            Conf.parse_bandwidth_limit(limit)
        end
end