Class: LcpRuby::Services::Checker::CheckResult
- Inherits:
-
Struct
- Object
- Struct
- LcpRuby::Services::Checker::CheckResult
- Defined in:
- lib/lcp_ruby/services/checker.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Instance Method Summary collapse
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors
6 7 8 |
# File 'lib/lcp_ruby/services/checker.rb', line 6 def errors @errors end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/lcp_ruby/services/checker.rb', line 11 def to_s if valid? "All service references are valid." else lines = [ "Service reference errors (#{errors.size}):" ] errors.each { |e| lines << " [ERROR] #{e}" } lines.join("\n") end end |
#valid? ⇒ Boolean
7 8 9 |
# File 'lib/lcp_ruby/services/checker.rb', line 7 def valid? errors.empty? end |