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.30 lib/faastruby/server/event_channel.rb
faastruby-0.5.29 lib/faastruby/server/event_channel.rb
faastruby-0.5.28 lib/faastruby/server/event_channel.rb
faastruby-0.5.27 lib/faastruby/server/event_channel.rb
faastruby-0.5.26 lib/faastruby/server/event_channel.rb
faastruby-0.5.25 lib/faastruby/server/event_channel.rb
faastruby-0.5.24 lib/faastruby/server/event_channel.rb
faastruby-0.5.23 lib/faastruby/server/event_channel.rb
faastruby-0.5.22 lib/faastruby/server/event_channel.rb
faastruby-0.5.21 lib/faastruby/server/event_channel.rb
faastruby-0.5.20 lib/faastruby/server/event_channel.rb
faastruby-0.5.19 lib/faastruby/server/event_channel.rb
faastruby-0.5.18 lib/faastruby/server/event_channel.rb
faastruby-0.5.17 lib/faastruby/server/event_channel.rb
faastruby-0.5.16 lib/faastruby/server/event_channel.rb
faastruby-0.5.15 lib/faastruby/server/event_channel.rb
faastruby-0.5.14 lib/faastruby/server/event_channel.rb
faastruby-0.5.13 lib/faastruby/server/event_channel.rb
faastruby-0.5.12 lib/faastruby/server/event_channel.rb
faastruby-0.5.11 lib/faastruby/server/event_channel.rb