# File lib/headless.rb, line 67 def initialize(options = {}) CliUtil.ensure_application_exists!('Xvfb', 'Xvfb not found on your system') @display = options.fetch(:display, DEFAULT_DISPLAY_NUMBER).to_i @autopick_display = options.fetch(:autopick, !options.key?(:display)) @reuse_display = options.fetch(:reuse, true) @dimensions = options.fetch(:dimensions, DEFAULT_DISPLAY_DIMENSIONS) @video_capture_options = options.fetch(:video, {}) @destroy_at_exit = options.fetch(:destroy_at_exit, true) # FIXME Xvfb launch should not happen inside the constructor attach_xvfb end