Sha256: 713776cca36afac2ec53641a3111b346a7178f65038f44d5f7e614e6d0417109
Contents?: true
Size: 447 Bytes
Versions: 4
Compression:
Stored size: 447 Bytes
Contents
module PageMagic class Driver attr_reader :supported_browsers, :handler def initialize(*supported_browsers, &block) @handler = block @supported_browsers = supported_browsers end def support?(browser) supported_browsers.include?(browser) end def build(app, browser:, options:{}) options[:browser] = browser driver_clazz = handler.call driver_clazz.new(app, options) end end end
Version data entries
4 entries across 4 versions & 1 rubygems