class ChromeDiff::CompareStatus

Attributes

diff[R]
diff_percent[R]
status[R]

Public Class Methods

new(status, stderr, width, height, threshold) click to toggle source
# File lib/chrome_diff/session.rb, line 12
def initialize(status, stderr, width, height, threshold)
  @status = status
  @threshold = threshold

  @diff = stderr.to_f.to_i
  @diff_percent = @diff.to_f / width / height * 100
end

Public Instance Methods

success?() click to toggle source
# File lib/chrome_diff/session.rb, line 20
def success?
  @diff_percent <= @threshold
end