Class: Rustic::Configs::Check
- Inherits:
-
Object
- Object
- Rustic::Configs::Check
- Includes:
- HooksExt
- Defined in:
- lib/rustic/configs/check.rb
Instance Attribute Summary collapse
-
#check_unused ⇒ Object
readonly
Returns the value of attribute check_unused.
-
#read_data_subset ⇒ Object
readonly
Returns the value of attribute read_data_subset.
-
#with_cache ⇒ Object
readonly
Returns the value of attribute with_cache.
Instance Method Summary collapse
- #check_unused! ⇒ Object
-
#initialize ⇒ Check
constructor
A new instance of Check.
- #subset(percent) ⇒ Object
- #with_cache! ⇒ Object
Methods included from HooksExt
Constructor Details
#initialize ⇒ Check
Returns a new instance of Check.
8 9 10 11 12 |
# File 'lib/rustic/configs/check.rb', line 8 def initialize @check_unused = false @read_data_subset = nil @with_cache = false end |
Instance Attribute Details
#check_unused ⇒ Object (readonly)
Returns the value of attribute check_unused.
6 7 8 |
# File 'lib/rustic/configs/check.rb', line 6 def check_unused @check_unused end |
#read_data_subset ⇒ Object (readonly)
Returns the value of attribute read_data_subset.
6 7 8 |
# File 'lib/rustic/configs/check.rb', line 6 def read_data_subset @read_data_subset end |
#with_cache ⇒ Object (readonly)
Returns the value of attribute with_cache.
6 7 8 |
# File 'lib/rustic/configs/check.rb', line 6 def with_cache @with_cache end |
Instance Method Details
#check_unused! ⇒ Object
14 |
# File 'lib/rustic/configs/check.rb', line 14 def check_unused! = @check_unused = true |
#subset(percent) ⇒ Object
17 18 19 20 21 |
# File 'lib/rustic/configs/check.rb', line 17 def subset(percent) raise ArgumentError, "percent must be > 0 and <= 100. Given: #{percent}" if percent <= 0 || percent > 100 @read_data_subset = percent end |
#with_cache! ⇒ Object
15 |
# File 'lib/rustic/configs/check.rb', line 15 def with_cache! = @with_cache = true |