Class: DRb::GW
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
MonitorMixin
|
|
Inherits: | Object |
Defined in: | lib/drb/gw.rb |
Overview
The GW provides a synchronized store for participants in the gateway to communicate.
Class Method Summary
-
.new ⇒ GW
constructor
Creates a new
GW
.
Instance Method Summary
-
#[](key)
Retrieves
key
from theGW
. -
#[]=(key, v)
Stores value
v
atkey
in theGW
.
Constructor Details
.new ⇒ GW
Creates a new GW
# File 'lib/drb/gw.rb', line 51
def initialize super() @hash = {} end
Instance Method Details
#[](key)
Retrieves key
from the GW
# File 'lib/drb/gw.rb', line 58
def [](key) synchronize do @hash[key] end end
#[]=(key, v)
Stores value v
at key
in the GW
# File 'lib/drb/gw.rb', line 66
def []=(key, v) synchronize do @hash[key] = v end end