Class: Actir::Webdriver::BrowserOptions
- Inherits:
-
Object
- Object
- Actir::Webdriver::BrowserOptions
- Defined in:
- lib/actir/webdriver/browser_options.rb
Instance Method Summary collapse
- #browser_options ⇒ Object
-
#initialize(opts, user_agent_string) ⇒ BrowserOptions
constructor
A new instance of BrowserOptions.
- #method_missing(*args, &block) ⇒ Object
Constructor Details
#initialize(opts, user_agent_string) ⇒ BrowserOptions
Returns a new instance of BrowserOptions.
7 8 9 10 11 12 13 |
# File 'lib/actir/webdriver/browser_options.rb', line 7 def initialize(opts, user_agent_string) @options = opts [:browser] ||= :chrome [:agent] ||= :iphone #options[:orientation] ||= :portrait initialize_for_browser(user_agent_string) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/actir/webdriver/browser_options.rb', line 15 def method_missing(*args, &block) m = args.first value = [m] super unless value value.downcase end |
Instance Method Details
#browser_options ⇒ Object
22 23 24 25 |
# File 'lib/actir/webdriver/browser_options.rb', line 22 def #options.except(:browser, :agent, :orientation) .except(:browser, :agent) end |