Sha256: 45ba991d325e7d43c99c50536d32f6db132d7d3ed53c11c403fba9af4d070141

Contents?: true

Size: 369 Bytes

Versions: 35

Compression:

Stored size: 369 Bytes

Contents

module FaaStRuby
  class EventChannel
    @@channels = {}
    def self.channels
      @@channels
    end
    attr_accessor :name
    def initialize(channel)
      @name = channel
      @@channels[channel] ||= []
    end
    def subscribe(function_path)
      @@channels[@name] << function_path
    end
    def subscribers
      @@channels[@name] || []
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
faastruby-0.5.10 lib/faastruby/server/event_channel.rb
faastruby-0.5.9 lib/faastruby/server/event_channel.rb
faastruby-0.5.8 lib/faastruby/server/event_channel.rb
faastruby-0.5.7 lib/faastruby/server/event_channel.rb
faastruby-0.5.6 lib/faastruby/server/event_channel.rb
faastruby-0.5.5 lib/faastruby/server/event_channel.rb
faastruby-0.5.4 lib/faastruby/server/event_channel.rb
faastruby-0.5.3 lib/faastruby/server/event_channel.rb
faastruby-0.5.2 lib/faastruby/server/event_channel.rb
faastruby-0.5.0 lib/faastruby/server/event_channel.rb
faastruby-0.4.18 lib/faastruby/server/event_channel.rb
faastruby-0.4.17 lib/faastruby/server/event_channel.rb
faastruby-0.4.16 lib/faastruby/server/event_channel.rb
faastruby-0.4.15 lib/faastruby/server/event_channel.rb
faastruby-0.4.14 lib/faastruby/server/event_channel.rb