Class: Wary::CheckSuite
- Inherits:
-
Object
- Object
- Wary::CheckSuite
- Defined in:
- lib/wary/check_suite.rb
Instance Attribute Summary collapse
-
#checks ⇒ Object
readonly
Returns the value of attribute checks.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(checks) ⇒ CheckSuite
constructor
A new instance of CheckSuite.
- #status ⇒ Object
Constructor Details
#initialize(checks) ⇒ CheckSuite
Returns a new instance of CheckSuite.
5 6 7 |
# File 'lib/wary/check_suite.rb', line 5 def initialize(checks) @checks = checks end |
Instance Attribute Details
#checks ⇒ Object (readonly)
Returns the value of attribute checks.
3 4 5 |
# File 'lib/wary/check_suite.rb', line 3 def checks @checks end |
Instance Method Details
#empty? ⇒ Boolean
9 10 11 |
# File 'lib/wary/check_suite.rb', line 9 def empty? checks.empty? end |
#status ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/wary/check_suite.rb', line 13 def status if checks.any? { |c| c.status == :alert } :alert else :ok end end |