class Capybara::Screenshot::Diff::Drivers::BaseDriver
Constants
- PNG_EXTENSION
Public Instance Methods
dimension(image)
click to toggle source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 31 def dimension(image) [width_for(image), height_for(image)] end
height_for(image)
click to toggle source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 19 def height_for(image) image.height end
image_area_size(image)
click to toggle source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 27 def image_area_size(image) width_for(image) * height_for(image) end
same_dimension?(comparison)
click to toggle source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 15 def same_dimension?(comparison) dimension(comparison.base_image) == dimension(comparison.new_image) end
width_for(image)
click to toggle source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 23 def width_for(image) image.width end