DRb::GW

class DRb::GW

Parent:
Object
Included modules:
MonitorMixin

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

Public Class Methods

new() Show source

Creates a new GW

Calls superclass method MonitorMixin.new
# File lib/drb/gw.rb, line 50
def initialize
  super()
  @hash = {}
end

Public Instance Methods

[](key) Show source

Retrieves key from the GW

# File lib/drb/gw.rb, line 57
def [](key)
  synchronize do
    @hash[key]
  end
end
[]=(key, v) Show source

Stores value v at key in the GW

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

Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部