Class: Screenpress::Compare::Phashion
- Inherits:
-
Object
- Object
- Screenpress::Compare::Phashion
- Defined in:
- lib/screenpress/compare/phashion.rb
Instance Attribute Summary collapse
-
#difference ⇒ Object
readonly
Returns the value of attribute difference.
-
#fresh_image ⇒ Object
readonly
Returns the value of attribute fresh_image.
-
#orig_image ⇒ Object
readonly
Returns the value of attribute orig_image.
Instance Method Summary collapse
-
#initialize(orig_path, fresh_path) ⇒ Phashion
constructor
A new instance of Phashion.
- #threshold ⇒ Object
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
#difference ⇒ Object (readonly)
Returns the value of attribute difference.
6 7 8 |
# File 'lib/screenpress/compare/phashion.rb', line 6 def difference @difference end |
#fresh_image ⇒ Object (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_image ⇒ Object (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
#threshold ⇒ Object
18 19 20 |
# File 'lib/screenpress/compare/phashion.rb', line 18 def threshold Screenpress.config.threshold || 15 end |