Sha256: 2fa40155c43a44ac2abe873080baffb9955a4af9dc1595f757549158535f67bd

Contents?: true

Size: 339 Bytes

Versions: 7

Compression:

Stored size: 339 Bytes

Contents

module Magent
  class WebSocketChannel < Magent::GenericChannel
    def self.push(message)
      self.instance.enqueue(message)
      self.instance
    end

    def self.dequeue
      self.instance.dequeue
    end

    def self.instance
      @channel ||= self.new(Magent.config["websocket_channel"]||"magent.websocket")
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
magent-0.6.2 lib/magent/web_socket_channel.rb
magent-0.6.1 lib/magent/web_socket_channel.rb
magent-0.6.0 lib/magent/web_socket_channel.rb
magent-0.5.4 lib/magent/web_socket_channel.rb
magent-0.5.3 lib/magent/web_socket_channel.rb
magent-0.5.2 lib/magent/web_socket_channel.rb
magent-0.5.1 lib/magent/web_socket_channel.rb