Class: DRb::GW

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

Instance Method Summary (collapse)

Methods included from MonitorMixin

extend_object, #mon_enter, #mon_exit, #mon_synchronize, #mon_try_enter, #new_cond

Constructor Details

- (GW) initialize

A new instance of GW



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

def initialize
  super()
  @hash = {}
end

Instance Method Details

- (Object) [](key)



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

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

- (Object) []=(key, v)



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

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