Class: Goggles::Iteration
- Inherits:
-
Object
- Object
- Goggles::Iteration
- Defined in:
- lib/goggles/iteration.rb
Overview
Executes the block passed to ‘Goggles.each` with every configured combination of browser
and browser size.
Instance Attribute Summary collapse
-
#browser ⇒ Object
readonly
Returns the value of attribute browser.
-
#browser_name ⇒ Object
readonly
Returns the value of attribute browser_name.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(driver, width, config) {|Watir::Browser| ... } ⇒ Iteration
constructor
Creates a script iteration instance, building yielded browser object from the given arguments.
Constructor Details
#initialize(driver, width, config) {|Watir::Browser| ... } ⇒ Iteration
Creates a script iteration instance, building yielded browser object from the
given arguments. Closes the browser instance after yielding to the block.
42 43 44 45 46 47 48 49 |
# File 'lib/goggles/iteration.rb', line 42 def initialize driver, width, config, &block @browser_name = driver @config = config @size = width build_browser yield browser browser.close end |
Instance Attribute Details
#browser ⇒ Object (readonly)
Returns the value of attribute browser.
31 32 33 |
# File 'lib/goggles/iteration.rb', line 31 def browser @browser end |
#browser_name ⇒ Object (readonly)
Returns the value of attribute browser_name.
31 32 33 |
# File 'lib/goggles/iteration.rb', line 31 def browser_name @browser_name end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
31 32 33 |
# File 'lib/goggles/iteration.rb', line 31 def config @config end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
31 32 33 |
# File 'lib/goggles/iteration.rb', line 31 def size @size end |