lib/page_magic/drivers.rb in page_magic-1.0.0.alpha17 vs lib/page_magic/drivers.rb in page_magic-1.0.0.alpha18

- old
+ new

@@ -1,7 +1,9 @@ require 'page_magic/driver' module PageMagic + # class Drivers - creates an object that can be used to hold driver definitions + # These PageMagic gets the user's chosen driver from this object. class Drivers def all @all ||= [] end @@ -11,9 +13,11 @@ def find(browser) all.find { |driver| driver.support?(browser) } end + # Loads drivers defined in files at the given path + # @param [String] path where the drivers are located def load(path = "#{__dir__}/drivers") require 'active_support/inflector' Dir["#{path}/*.rb"].each do |driver_file| require driver_file