Class: ThreadStackCombinator
- Inherits:
-
Object
- Object
- ThreadStackCombinator
- Defined in:
- lib/threadStackCombinator.rb
Instance Attribute Summary collapse
-
#combinedThreadStacks ⇒ Object
Returns the value of attribute combinedThreadStacks.
Instance Method Summary collapse
- #combine(threadStack) ⇒ Object
-
#initialize ⇒ ThreadStackCombinator
constructor
A new instance of ThreadStackCombinator.
Constructor Details
#initialize ⇒ ThreadStackCombinator
Returns a new instance of ThreadStackCombinator.
4 5 6 |
# File 'lib/threadStackCombinator.rb', line 4 def initialize @combinedThreadStacks = Array.new end |
Instance Attribute Details
#combinedThreadStacks ⇒ Object
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 |