Class: Foobara::AWS::Check::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/foobara/aws/check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#findingsObject (readonly)

Returns the value of attribute findings

Returns:

  • (Object)

    the current value of findings



52
53
54
# File 'lib/foobara/aws/check.rb', line 52

def findings
  @findings
end

Instance Method Details

#failuresObject



54
# File 'lib/foobara/aws/check.rb', line 54

def failures = findings.reject(&:ok)

#ok?Boolean

Returns:

  • (Boolean)


53
# File 'lib/foobara/aws/check.rb', line 53

def ok? = findings.all?(&:ok)

#reportObject



56
57
58
59
# File 'lib/foobara/aws/check.rb', line 56

def report
  summary = "#{findings.count(&:ok)}/#{findings.length} checks passed"
  ([summary] + findings.map(&:to_s)).join("\n")
end