module ThreadAncestors
Constants
- VERSION
Public Class Methods
new(*)
click to toggle source
Calls superclass method
# File lib/thread_ancestors.rb, line 2 def initialize(*) @_parent = Thread.current super end
Public Instance Methods
ancestors()
click to toggle source
# File lib/thread_ancestors.rb, line 7 def ancestors Enumerator.new do |enum| t = Thread.current while t = t.parent enum.yield t end end.lazy end
parent()
click to toggle source
# File lib/thread_ancestors.rb, line 16 def parent @_parent end