Class: DRb::GW

Inherits:
Object
  • Object
show all
Includes:
MonitorMixin
Defined in:
lib/drb/gw.rb

Instance Method Summary collapse

Constructor Details

#initializeGW

Returns a new instance of GW.



16
17
18
19
# File 'lib/drb/gw.rb', line 16

def initialize
  super()
  @hash = {}
end

Instance Method Details

#[](key) ⇒ Object



21
22
23
24
25
# File 'lib/drb/gw.rb', line 21

def [](key)
  synchronize do
    @hash[key]
  end
end

#[]=(key, v) ⇒ Object



27
28
29
30
31
# File 'lib/drb/gw.rb', line 27

def []=(key, v)
  synchronize do
    @hash[key] = v
  end
end