Sha256: d35f28bafdd3c1cadae0e70ab7682f0f1557f2922e26f6f00096d57e278e7657
Contents?: true
Size: 511 Bytes
Versions: 69
Compression:
Stored size: 511 Bytes
Contents
module ForemanTasks class Task::StatusExplicator ANY = 1 ERRONEOUS_STATUSES = [ { :state => 'paused', :result => ANY }, { :state => ANY, :result => 'error' }, { :state => ANY, :result => 'warning' } ].freeze def is_erroneous(task) remainder = ERRONEOUS_STATUSES.select do |status| (status[:state] == ANY || status[:state] == task.state) && (status[:result] == ANY || status[:result] == task.result) end !remainder.empty? end end end
Version data entries
69 entries across 69 versions & 1 rubygems