Parent

Methods

Thrift::LookaheadReader

Public Class Methods

new(trans) click to toggle source
# File lib/thrift/protocol/json_protocol.rb, line 38
def initialize(trans)
  @trans = trans
  @hasData = false
  @data = nil
end

Public Instance Methods

peek() click to toggle source
# File lib/thrift/protocol/json_protocol.rb, line 54
def peek
  if !@hasData
    @data = @trans.read(1)
  end
  @hasData = true
  return @data
end
read() click to toggle source
# File lib/thrift/protocol/json_protocol.rb, line 44
def read
  if @hasData
    @hasData = false
  else
    @data = @trans.read(1)
  end

  return @data
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.