Class: Kameleon::Ext::Capybara::SessionPool

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/kameleon/ext/capybara/session_pool.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.nice=(value) ⇒ Object (writeonly)

Sets the attribute nice

Parameters:

  • value

    the value to set the attribute nice to.



9
10
11
# File 'lib/kameleon/ext/capybara/session_pool.rb', line 9

def nice=(value)
  @nice = value
end

Class Method Details

.release_allObject



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|
    attach_to_capybara_session_pool(driver, name, session)
  end
end