class Barrister::BatchTransport

Internal transport used by the BatchClient. You shouldn’t create this directly.

Attributes

requests[RW]
sent[RW]

Public Class Methods

new(client) click to toggle source
# File lib/barrister.rb, line 444
def initialize(client)
  @client   = client
  @requests = [ ]
  @sent     = false
end

Public Instance Methods

request(req) click to toggle source

Request simply stores the req object in an interal Array When send() is called on the BatchClient, these are sent to the server.

# File lib/barrister.rb, line 452
def request(req)
  if @sent
    raise "Batch has already been sent!"
  end
  @requests << req
  return nil
end