Sha256: 46d6de9b9f6085d048ae58a367425b7b547a516318b298a1a469299746ac2738

Contents?: true

Size: 443 Bytes

Versions: 20

Compression:

Stored size: 443 Bytes

Contents

module Loco
  module Emitter
    def emit obj, event = nil, opts = {}
      Broadcaster.new(obj, event, opts).emit
    end

    def emit_to recipient, data
      Sender.new(recipient, data).emit
    end

    def add_hub name, members = []
      Hub.new(name, members).save
    end

    def get_hub name
      Hub.get name
    end

    def del_hub name
      hub = Hub.get name
      return false if hub.nil?
      hub.destroy
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
loco-rails-2.5.3 lib/loco/emitter.rb
loco-rails-2.5.2 lib/loco/emitter.rb
loco-rails-2.5.1 lib/loco/emitter.rb
loco-rails-2.5.0 lib/loco/emitter.rb
loco-rails-2.4.0 lib/loco/emitter.rb
loco-rails-2.3.0 lib/loco/emitter.rb
loco-rails-3.0.0 lib/loco/emitter.rb
loco-rails-2.2.2 lib/loco/emitter.rb
loco-rails-2.2.1 lib/loco/emitter.rb
loco-rails-2.2.0 lib/loco/emitter.rb
loco-rails-2.1.0 lib/loco/emitter.rb
loco-rails-2.0.0 lib/loco/emitter.rb
loco-rails-1.5.2 lib/loco/emitter.rb
loco-rails-1.5.1 lib/loco/emitter.rb
loco-rails-1.5.0 lib/loco/emitter.rb
loco-rails-1.4.0 lib/loco/emitter.rb
loco-rails-1.3.3 lib/loco/emitter.rb
loco-rails-1.3.2 lib/loco/emitter.rb
loco-rails-1.3.1 lib/loco/emitter.rb
loco-rails-1.3.0 lib/loco/emitter.rb