class Abalone::Buffer

Public Class Methods

new() click to toggle source
# File lib/abalone/buffer.rb, line 3
def initialize
  @buffer = ''
end

Public Instance Methods

close_connection() click to toggle source
# File lib/abalone/buffer.rb, line 13
def close_connection
  # nop
end
replay() click to toggle source
# File lib/abalone/buffer.rb, line 17
def replay
  retval  = @buffer
  @buffer = ''
  retval
end
send(message) click to toggle source
# File lib/abalone/buffer.rb, line 7
def send(message)
  @buffer << JSON.parse(message)['data']
rescue
  nil
end