Class: DataChecks::CheckResult
- Inherits:
-
Object
- Object
- DataChecks::CheckResult
- Defined in:
- lib/data_checks/check_result.rb
Instance Attribute Summary collapse
-
#check ⇒ Object
readonly
Returns the value of attribute check.
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#passing ⇒ Object
readonly
Returns the value of attribute passing.
Instance Method Summary collapse
- #error? ⇒ Boolean
- #failing? ⇒ Boolean
-
#initialize(check:, passing: false, count: nil, entries: nil, error: nil) ⇒ CheckResult
constructor
A new instance of CheckResult.
- #passing? ⇒ Boolean
Constructor Details
#initialize(check:, passing: false, count: nil, entries: nil, error: nil) ⇒ CheckResult
Returns a new instance of CheckResult.
7 8 9 10 11 12 13 |
# File 'lib/data_checks/check_result.rb', line 7 def initialize(check:, passing: false, count: nil, entries: nil, error: nil) @check = check @passing = passing @count = count @entries = entries @error = error end |
Instance Attribute Details
#check ⇒ Object (readonly)
Returns the value of attribute check.
5 6 7 |
# File 'lib/data_checks/check_result.rb', line 5 def check @check end |
#count ⇒ Object (readonly)
Returns the value of attribute count.
5 6 7 |
# File 'lib/data_checks/check_result.rb', line 5 def count @count end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
5 6 7 |
# File 'lib/data_checks/check_result.rb', line 5 def entries @entries end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
5 6 7 |
# File 'lib/data_checks/check_result.rb', line 5 def error @error end |
#passing ⇒ Object (readonly)
Returns the value of attribute passing.
5 6 7 |
# File 'lib/data_checks/check_result.rb', line 5 def passing @passing end |
Instance Method Details
#error? ⇒ Boolean
23 24 25 |
# File 'lib/data_checks/check_result.rb', line 23 def error? error end |
#failing? ⇒ Boolean
19 20 21 |
# File 'lib/data_checks/check_result.rb', line 19 def failing? !passing && error.nil? end |
#passing? ⇒ Boolean
15 16 17 |
# File 'lib/data_checks/check_result.rb', line 15 def passing? passing end |