Class: Kameleon::Ext::Capybara::SessionPool
- Inherits:
-
Object
- Object
- Kameleon::Ext::Capybara::SessionPool
- Includes:
- Singleton
- Defined in:
- lib/kameleon/ext/capybara/session_pool.rb
Class Attribute Summary collapse
-
.nice ⇒ Object
writeonly
Sets the attribute nice.
Class Method Summary collapse
Class Attribute Details
.nice=(value) ⇒ Object (writeonly)
Sets the attribute nice
9 10 11 |
# File 'lib/kameleon/ext/capybara/session_pool.rb', line 9 def nice=(value) @nice = value end |
Class Method Details
.release_all ⇒ Object
17 18 19 20 |
# File 'lib/kameleon/ext/capybara/session_pool.rb', line 17 def release_all idle.concat(busy) busy.clear end |
.session(driver, name = :default) ⇒ Object
11 12 13 14 15 |
# File 'lib/kameleon/ext/capybara/session_pool.rb', line 11 def session(driver, name = :default) (take_idle(driver) || create(driver)).tap do |session| (driver, name, session) end end |