Class: Rustic::CommandBuilders::Check
- Inherits:
-
Object
- Object
- Rustic::CommandBuilders::Check
- Defined in:
- lib/rustic/command_builders/check.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(config) ⇒ Check
constructor
A new instance of Check.
Constructor Details
#initialize(config) ⇒ Check
Returns a new instance of Check.
6 7 8 |
# File 'lib/rustic/command_builders/check.rb', line 6 def initialize(config) @config = config.check_config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/rustic/command_builders/check.rb', line 4 def config @config end |
Instance Method Details
#build ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/rustic/command_builders/check.rb', line 10 def build [ "check", @config&.check_unused ? "--check-unused" : nil, read_data_subset, @config&.with_cache ? "--with-cache" : nil ].compact end |