Class: ThreadStackCombinator

Inherits:
Object
  • Object
show all
Defined in:
lib/threadStackCombinator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeThreadStackCombinator

Returns a new instance of ThreadStackCombinator.



4
5
6
# File 'lib/threadStackCombinator.rb', line 4

def initialize
	@combinedThreadStacks = Array.new
end

Instance Attribute Details

#combinedThreadStacksObject

Returns the value of attribute combinedThreadStacks.



2
3
4
# File 'lib/threadStackCombinator.rb', line 2

def combinedThreadStacks
  @combinedThreadStacks
end

Instance Method Details

#combine(threadStack) ⇒ Object



8
9
10
# File 'lib/threadStackCombinator.rb', line 8

def combine(threadStack)
	@combinedThreadStacks << threadStack unless @combinedThreadStacks.count { |combinedThreadStack| combinedThreadStack.merge(threadStack)} > 0
end