In Files

  • ruby-3.1.2/lib/drb/gw.rb

Parent

Methods

Included Modules

Files

Class/Module Index [+]

Quicksearch

DRb::GW

The GW provides a synchronized store for participants in the gateway to communicate.

Public Class Methods

new() click to toggle source

Creates a new GW

 
               # File ruby-3.1.2/lib/drb/gw.rb, line 51
def initialize
  super()
  @hash = {}
end
            

Public Instance Methods

[](key) click to toggle source

Retrieves key from the GW

 
               # File ruby-3.1.2/lib/drb/gw.rb, line 58
def [](key)
  synchronize do
    @hash[key]
  end
end
            
[]=(key, v) click to toggle source

Stores value v at key in the GW

 
               # File ruby-3.1.2/lib/drb/gw.rb, line 66
def []=(key, v)
  synchronize do
    @hash[key] = v
  end
end