class Capybara::Screenshot::Diff::Drivers::BaseDriver
Constants
- PNG_EXTENSION
Public Instance Methods
Source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 30 def dimension(image) [width_for(image), height_for(image)] end
Source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 18 def height_for(image) image.height end
Source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 26 def image_area_size(image) width_for(image) * height_for(image) end
Source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 14 def same_dimension?(comparison) dimension(comparison.base_image) == dimension(comparison.new_image) end
Source
# File lib/capybara/screenshot/diff/drivers/base_driver.rb, line 22 def width_for(image) image.width end