Sha256: 0051bdee40da25f73001d6c6533596890dbe2d303e952632b00991bbe9aeff6e

Contents?: true

Size: 563 Bytes

Versions: 5

Compression:

Stored size: 563 Bytes

Contents

module Outliers
  class Result

    attr_reader :evaluation, :failing_resources, :passing_resources, :resource, :verification

    def initialize(args)
      @evaluation        = args[:evaluation]
      @failing_resources = args[:failing_resources]
      @passing_resources = args[:passing_resources]
      @resource          = args[:resource]
      @verification      = args[:verification]
    end

    def to_s
      passed? ? 'passed' : 'failed'
    end

    def passed?
      !failed?
    end

    def failed?
      @failing_resources.any?
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
outliers-0.3.3 lib/outliers/result.rb
outliers-0.3.2 lib/outliers/result.rb
outliers-0.3.1 lib/outliers/result.rb
outliers-0.3.0 lib/outliers/result.rb
outliers-0.2.0 lib/outliers/result.rb