Class: ImageComparable::Image
- Inherits:
-
Object
- Object
- ImageComparable::Image
- Defined in:
- lib/image_comparable/image.rb
Instance Attribute Summary collapse
-
#image ⇒ Object
Returns the value of attribute image.
Instance Method Summary collapse
- #delete_image!(image) ⇒ Object
-
#initialize(path) ⇒ Image
constructor
A new instance of Image.
- #size_match?(compare) ⇒ Boolean
Constructor Details
#initialize(path) ⇒ Image
Returns a new instance of Image.
6 7 8 |
# File 'lib/image_comparable/image.rb', line 6 def initialize(path) @image = ChunkyPNG::Image.from_file(path) end |
Instance Attribute Details
#image ⇒ Object
Returns the value of attribute image.
4 5 6 |
# File 'lib/image_comparable/image.rb', line 4 def image @image end |
Instance Method Details
#delete_image!(image) ⇒ Object
15 16 |
# File 'lib/image_comparable/image.rb', line 15 def delete_image!(image) end |
#size_match?(compare) ⇒ Boolean
10 11 12 13 |
# File 'lib/image_comparable/image.rb', line 10 def size_match?(compare) @image.height == compare.image.height && @image.width == compare.image.width end |