Class: Thread

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ Thread

Returns a new instance of Thread.



26
27
28
29
# File 'lib/thread_parent.rb', line 26

def initialize(*args, &block)
  @_parent = Thread.current
  _initialize(*args, &block)
end

Class Method Details

.parentsObject



39
40
41
# File 'lib/thread_parent.rb', line 39

def self.parents
  ThreadParent::Parents.new(Thread.current)
end

Instance Method Details

#_initializeObject



24
# File 'lib/thread_parent.rb', line 24

alias_method :_initialize, :initialize

#parentObject



31
32
33
# File 'lib/thread_parent.rb', line 31

def parent
  @_parent
end

#parentsObject



35
36
37
# File 'lib/thread_parent.rb', line 35

def parents
  ThreadParent::Parents.new(self)
end