Class: BuildEval::Travis::Session::Pool

Inherits:
Object
  • Object
show all
Defined in:
lib/build_eval/travis/session/pool.rb

Class Method Summary collapse

Class Method Details

.clearObject


18
19
20
# File 'lib/build_eval/travis/session/pool.rb', line 18

def clear
  @pool = {}
end

.get(github_token) ⇒ Object


9
10
11
# File 'lib/build_eval/travis/session/pool.rb', line 9

def get(github_token)
  get_session(github_token) || create_session(github_token)
end

.release(session) ⇒ Object


13
14
15
16
# File 'lib/build_eval/travis/session/pool.rb', line 13

def release(session)
  session.clear_cache
  sessions_for(session.github_token) << session
end