Sha256: 78b7b655cf70226270ab54d86f816c27151e89eaea1af5afbfdf839059fa36ab
Contents?: true
Size: 457 Bytes
Versions: 1
Compression:
Stored size: 457 Bytes
Contents
module PageMagic # class Driver - instances are factories for drivers used by 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:{}) handler.call(app, options, browser) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
page_magic-1.0.0.alpha18 | lib/page_magic/driver.rb |