class Sparkql::ErrorsProcessor
Attributes
errors[RW]
Public Class Methods
new( errors = [] )
click to toggle source
# File lib/sparkql/errors.rb, line 6 def initialize( errors = [] ) @errors = Array(errors) end
Public Instance Methods
dropped_errors?()
click to toggle source
true if there is at least one :dropped error in the error stack
# File lib/sparkql/errors.rb, line 29 def dropped_errors? errors_by_status? :dropped end
errors?()
click to toggle source
true if the error stack contains at least one error
# File lib/sparkql/errors.rb, line 11 def errors? @errors.size > 0 end
errors_by_status?( status )
click to toggle source
true if there is at least one error of status :status in the error stack
# File lib/sparkql/errors.rb, line 16 def errors_by_status?( status ) @errors.each do | error | return true if status == error.status end false end
fatal_errors?()
click to toggle source
true if there is at least one :fatal error in the error stack
# File lib/sparkql/errors.rb, line 24 def fatal_errors? errors_by_status? :fatal end
recovered_errors?()
click to toggle source
true if there is at least one :recovered error in the error stack
# File lib/sparkql/errors.rb, line 34 def recovered_errors? errors_by_status? :recovered end