Sha256: d837ec834232b370e80695bfe7ab523cc9d3fdd21fa1af749754549eda25ea18

Contents?: true

Size: 475 Bytes

Versions: 6

Compression:

Stored size: 475 Bytes

Contents

# frozen_string_literal: true

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

6 entries across 6 versions & 1 rubygems

Version Path
loco-rails-3.0.6 lib/loco/emitter.rb
loco-rails-3.0.5 lib/loco/emitter.rb
loco-rails-3.0.4 lib/loco/emitter.rb
loco-rails-3.0.3 lib/loco/emitter.rb
loco-rails-3.0.2 lib/loco/emitter.rb
loco-rails-3.0.1 lib/loco/emitter.rb