Class: CherryPickingMoments::Image
- Inherits:
-
Object
- Object
- CherryPickingMoments::Image
- Defined in:
- lib/cherry_picking_moments/image.rb
Instance Attribute Summary collapse
-
#filepath ⇒ Object
readonly
Returns the value of attribute filepath.
-
#following_distance ⇒ Object
Returns the value of attribute following_distance.
Instance Method Summary collapse
- #distance_from(image) ⇒ Object
-
#initialize(filepath) ⇒ Image
constructor
A new instance of Image.
- #phashion_image ⇒ Object
Constructor Details
#initialize(filepath) ⇒ Image
Returns a new instance of Image.
7 8 9 |
# File 'lib/cherry_picking_moments/image.rb', line 7 def initialize(filepath) @filepath = filepath end |
Instance Attribute Details
#filepath ⇒ Object (readonly)
Returns the value of attribute filepath.
4 5 6 |
# File 'lib/cherry_picking_moments/image.rb', line 4 def filepath @filepath end |
#following_distance ⇒ Object
Returns the value of attribute following_distance.
5 6 7 |
# File 'lib/cherry_picking_moments/image.rb', line 5 def following_distance @following_distance end |
Instance Method Details
#distance_from(image) ⇒ Object
11 12 13 |
# File 'lib/cherry_picking_moments/image.rb', line 11 def distance_from(image) phashion_image.distance_from(image.phashion_image) end |
#phashion_image ⇒ Object
15 16 17 |
# File 'lib/cherry_picking_moments/image.rb', line 15 def phashion_image @phashion_image ||= Phashion::Image.new(@filepath) end |