Sha256: a75ddc971dee35ff49571ee3e49722aa06779a317903c460eed50374cc877be5

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 Bytes

Contents

module Actors
  class Hub
    require "typed_map"
    require "actors/hub/actors_proxy"

    attr_reader :name

    def initialize(name)
      raise ArgumentError, "'name' should be an instance of Symbol" unless name.instance_of? Symbol

      @name         = name
      @actors       = TypedMap.new(ktype: Symbol, vtype: Actors::Actor)
      @channels     = TypedMap.new(ktype: Symbol, vtype: Actors::Channel)
      @actors_proxy = ActorsProxy.new(@actors, @channels)
    end

    def actors
      @actors_proxy
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
actors-0.1.0 lib/actors/hub.rb