Sha256: 7ef61338ad8028263660a6e669dea90c959a0c2b15b45b6c7a6aa1e740f0a333
Contents?: true
Size: 445 Bytes
Versions: 4
Compression:
Stored size: 445 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