Class: Screenpress::Compare::Phashion

Inherits:
Object
  • Object
show all
Defined in:
lib/screenpress/compare/phashion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(orig_path, fresh_path) ⇒ Phashion

Returns a new instance of Phashion.



7
8
9
10
# File 'lib/screenpress/compare/phashion.rb', line 7

def initialize(orig_path, fresh_path)
  @orig_image  = ::Phashion::Image.new(orig_path)
  @fresh_image = ::Phashion::Image.new(fresh_path)
end

Instance Attribute Details

#differenceObject (readonly)

Returns the value of attribute difference.



6
7
8
# File 'lib/screenpress/compare/phashion.rb', line 6

def difference
  @difference
end

#fresh_imageObject (readonly)

Returns the value of attribute fresh_image.



6
7
8
# File 'lib/screenpress/compare/phashion.rb', line 6

def fresh_image
  @fresh_image
end

#orig_imageObject (readonly)

Returns the value of attribute orig_image.



6
7
8
# File 'lib/screenpress/compare/phashion.rb', line 6

def orig_image
  @orig_image
end

Instance Method Details

#thresholdObject



18
19
20
# File 'lib/screenpress/compare/phashion.rb', line 18

def threshold
  Screenpress.config.threshold || 15
end