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