Class: ImageDiff::PNGSnapshot

Inherits:
Snapshot
  • Object
show all
Includes:
Helpers::Screenshot
Defined in:
lib/image_diff/png_snapshot.rb

Overview

Screenshot class

Class Attribute Summary collapse

Attributes inherited from Snapshot

#file, #snapshot_path

Instance Method Summary collapse

Methods included from Helpers::Screenshot

#fullpage, #fullpage_height, #fullpage_screenshot, #resize_window, #screenshot

Methods inherited from Snapshot

#filename, #filepath, #fullpath, #initialize

Methods included from Differ

#reference_file

Methods included from Writer

#path_and_filename

Constructor Details

This class inherits a constructor from ImageDiff::Snapshot

Class Attribute Details

.master_screenshot_pathObject (readonly)

Returns the value of attribute master_screenshot_path.



13
14
15
# File 'lib/image_diff/png_snapshot.rb', line 13

def master_screenshot_path
  @master_screenshot_path
end

Instance Method Details

#compareObject



24
25
26
27
# File 'lib/image_diff/png_snapshot.rb', line 24

def compare
  write
  ImageDiff.new(self)
end

#extensionObject



16
17
18
# File 'lib/image_diff/png_snapshot.rb', line 16

def extension
  '.png'
end

#writeObject



20
21
22
# File 'lib/image_diff/png_snapshot.rb', line 20

def write
  fullpage_screenshot(path_and_filename)
end