Class: DRb::GW
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, v) ⇒ Object
-
#initialize ⇒ GW
constructor
A new instance of GW.
Constructor Details
#initialize ⇒ GW
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 |