class Gauge::GaugeScreenshot
Public Class Methods
Source
# File lib/gauge_screenshot.rb, line 19 def self.instance @gauge_screenshots ||= GaugeScreenshot.new end
Public Instance Methods
Source
# File lib/gauge_screenshot.rb, line 23 def capture @screenshots.push(capture_to_file) end
Source
# File lib/gauge_screenshot.rb, line 27 def capture_to_file unless Configuration.instance.screenshot_writer? content = Configuration.instance.screengrabber.call file_name = Util.unique_screenshot_file File.write(file_name, content) return File.basename(file_name) end Configuration.instance.screengrabber.call end
Source
# File lib/gauge_screenshot.rb, line 37 def pending_screenshot pending_screenshot = @screenshots clear pending_screenshot end