Class: Restic::Service::Targets::Base
- Inherits:
-
Object
- Object
- Restic::Service::Targets::Base
- Defined in:
- lib/restic/service/targets/base.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Base
constructor
A new instance of Base.
- #setup_from_conf(conf, yaml) ⇒ Object
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
#name ⇒ Object (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 |