class Verifier::Result
Attributes
errors[RW]
name[RW]
warnings[RW]
Public Class Methods
new()
click to toggle source
# File lib/verifier.rb, line 22 def initialize @valid = false @safe = false @errors = Array.new @warnings = Array.new end
Public Instance Methods
has_warnings?()
click to toggle source
# File lib/verifier.rb, line 33 def has_warnings? !@warnings.empty? end
print_result()
click to toggle source
# File lib/verifier.rb, line 37 def print_result print "Verify manifest #{@name}..." if valid? puts "ok" else puts "error" @errors.each do |error| puts " #{error}" end end if has_warnings? @warnings.each do |warning| puts " #{warning}" end end end
valid?()
click to toggle source
# File lib/verifier.rb, line 29 def valid? @errors.empty? end