Sha256: 0c11d4380ba8de277e9175535e221f37e457f84b77c2445461b8ea31ca6d065a
Contents?: true
Size: 512 Bytes
Versions: 59
Compression:
Stored size: 512 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
59 entries across 59 versions & 1 rubygems