Class: DRb::GW
Overview
The GW provides a synchronized store for participants in the gateway to communicate.
Instance Method Summary collapse
-
#[](key) ⇒ Object
Retrieves
key
from the GW. -
#[]=(key, v) ⇒ Object
Stores value
v
atkey
in the GW. -
#initialize ⇒ GW
constructor
Creates a new GW.
Constructor Details
#initialize ⇒ GW
Creates a new GW
51 52 53 54 |
# File 'lib/drb/gw.rb', line 51 def initialize super() @hash = {} end |
Instance Method Details
#[](key) ⇒ Object
Retrieves key
from the GW
58 59 60 61 62 |
# File 'lib/drb/gw.rb', line 58 def [](key) synchronize do @hash[key] end end |
#[]=(key, v) ⇒ Object
Stores value v
at key
in the GW
66 67 68 69 70 |
# File 'lib/drb/gw.rb', line 66 def []=(key, v) synchronize do @hash[key] = v end end |