Module: Flunky
- Defined in:
- lib/flunky.rb,
lib/flunky/agent.rb,
lib/flunky/tools.rb,
lib/flunky/errors.rb,
lib/flunky/actions.rb,
lib/flunky/session.rb,
lib/flunky/version.rb,
lib/flunky/snapshot.rb,
lib/flunky/drivers/base.rb,
lib/flunky/configuration.rb,
lib/flunky/drivers/ferrum_driver.rb
Defined Under Namespace
Modules: Drivers Classes: Actions, Agent, Configuration, ElementNotFound, Error, NotSupported, Session, Snapshot, Tools, UnknownTool
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
- .configuration ⇒ Object
- .configure {|configuration| ... } ⇒ Object
-
.reset_configuration! ⇒ Object
Mainly here so specs can start from a clean slate.
-
.session(**opts) ⇒ Object
Convenience entry point: open a session, hand it to the block, and always close the browser even if the block raises.
Class Method Details
.configuration ⇒ Object
34 35 36 |
# File 'lib/flunky/configuration.rb', line 34 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
38 39 40 41 |
# File 'lib/flunky/configuration.rb', line 38 def configure yield configuration if block_given? configuration end |
.reset_configuration! ⇒ Object
Mainly here so specs can start from a clean slate.
44 45 46 |
# File 'lib/flunky/configuration.rb', line 44 def reset_configuration! @configuration = Configuration.new end |
.session(**opts) ⇒ Object
Convenience entry point: open a session, hand it to the block, and always close the browser even if the block raises.
17 18 19 20 21 22 23 |
# File 'lib/flunky.rb', line 17 def self.session(**opts) session = Session.new(**opts) yield session if block_given? session ensure session&.close end |