Class: Actor::Substitutes::ThreadGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/actor/substitutes/thread_group.rb

Instance Method Summary collapse

Constructor Details

#initializeThreadGroup

Returns a new instance of ThreadGroup.



4
5
6
7
# File 'lib/actor/substitutes/thread_group.rb', line 4

def initialize
  @list = []
  @enclosed = false
end

Instance Method Details

#add(thread) ⇒ Object



9
10
11
# File 'lib/actor/substitutes/thread_group.rb', line 9

def add thread
  @list << thread
end

#encloseObject



17
18
19
# File 'lib/actor/substitutes/thread_group.rb', line 17

def enclose
  @enclosed = true
end

#enclosed?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/actor/substitutes/thread_group.rb', line 21

def enclosed?
  @enclosed
end

#listObject



13
14
15
# File 'lib/actor/substitutes/thread_group.rb', line 13

def list
  @list.dup
end