class OmgImage::Shell
Public Class Methods
command(options)
click to toggle source
# 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
Private Class Methods
chrome()
click to toggle source
# File lib/omg_image/shell.rb, line 10 def self.chrome if OS.windows? "chrome" elsif OS.mac? "\"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome\"" else "google-chrome" end end