Class: Thread

Inherits:
Object show all
Defined in:
opal/stdlib/thread.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeThread

Returns a new instance of Thread



6
7
8
# File 'opal/stdlib/thread.rb', line 6

def initialize
  @vars = {}
end

Class Method Details

.currentObject



2
3
4
# File 'opal/stdlib/thread.rb', line 2

def self.current
  @current ||= self.new
end

Instance Method Details

#[](key) ⇒ Object



10
11
12
# File 'opal/stdlib/thread.rb', line 10

def [](key)
  @vars[key]
end

#[]=(key, val) ⇒ Object



14
15
16
# File 'opal/stdlib/thread.rb', line 14

def []=(key, val)
  @vars[key] = val
end