Sha256: 80dd45582c2c0351dbaf9c773ace856aea95c8db71e41a24c49441d5b030600f

Contents?: true

Size: 612 Bytes

Versions: 6

Compression:

Stored size: 612 Bytes

Contents

class ChannelHandlerStub
  def self.dispatcher=(val)
    @@dispatcher = val
  end

  def self.dispatcher
    @@dispatcher
  end
  
  def initialize(channel_stub)
    puts "INIT WITH : #{channel_stub.inspect}"
    @channel_stub = channel_stub
  end

  # Sends a message to all, optionally skipping a users channel
  def self.send_message_all(skip_channel=nil, *args)
    # Stub
  end

  def process_message(message)
    puts "GOT: #{message.inspect}"
    @@dispatcher.dispatch(self, message)
  end

  def send_message(*args)
    puts "SEND MSG: #{args.inspect}"
    @channel_stub.message_received(*args)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
volt-0.4.7 lib/volt/server/channel_handler_stub.rb
volt-0.4.5 lib/volt/server/channel_handler_stub.rb
volt-0.4.4 lib/volt/server/channel_handler_stub.rb
volt-0.4.3 lib/volt/server/channel_handler_stub.rb
volt-0.4.2 lib/volt/server/channel_handler_stub.rb
volt-0.4.1 lib/volt/server/channel_handler_stub.rb