Class: OmgImage::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/omg_image/shell.rb

Class Method Summary collapse

Class Method Details

.command(options) ⇒ Object



3
4
5
6
# File 'lib/omg_image/shell.rb', line 3

def Shell.command(options)
  size_opts = options[:size] == :auto ? nil : "--window-size=#{options[:size]}"
  "#{chrome} --headless --disable-gpu --no-sandbox --ignore-certificate-errors --screenshot=#{options[:file].path} #{size_opts} \"file://#{options[:path]}\""
end