class Precheck::RuleProcessResult
encapsulated the results of the rule processing, needed to return not just an array of the results of our checks, but also an array of items we didn't check, just in-case we were expecting to check everything
Attributes
error_results[RW]
items_not_checked[RW]
skipped_rules[RW]
warning_results[RW]
Public Class Methods
new(error_results: nil, warning_results: nil, skipped_rules: nil, items_not_checked: nil)
click to toggle source
# File precheck/lib/precheck/rule_processor.rb, line 18 def initialize(error_results: nil, warning_results: nil, skipped_rules: nil, items_not_checked: nil) @error_results = error_results @warning_results = warning_results @skipped_rules = skipped_rules @items_not_checked = items_not_checked end
Public Instance Methods
has_errors_or_warnings?()
click to toggle source
# File precheck/lib/precheck/rule_processor.rb, line 33 def has_errors_or_warnings? return true if error_results.length > 0 || warning_results.length > 0 return false end
items_not_checked?()
click to toggle source
# File precheck/lib/precheck/rule_processor.rb, line 38 def items_not_checked? return true if items_not_checked.length > 0 return false end
should_trigger_user_error?()
click to toggle source
# File precheck/lib/precheck/rule_processor.rb, line 28 def should_trigger_user_error? return true if error_results.length > 0 return false end