module Polterheist::Screenshot

Public Class Methods

included(base) click to toggle source
# File lib/polterheist/screenshot.rb, line 3
def self.included(base)
  require 'launchy'
  require 'fileutils'
end

Public Instance Methods

ss() click to toggle source
# File lib/polterheist/screenshot.rb, line 8
def ss
  path = '/tmp/screenshot.png'
  FileUtils.rm(path) if File.exists?(path)
  page.save_screenshot path
  Launchy.open path
end