struct Redis::Parser

Defined in:

parser.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(io : IO) #

Initialize a parser to read from the given IO


[View source]

Instance Method Detail

def read : Value #

Read a Redis::Value from the parser's IO

Example:

io = IO::Memory.new
io << "$3\r\n"
io << "foo\r\n"
io.rewind

Parser.new(io).read # => "foo"

[View source]
def read? #

Reads a value from the IO, returning nil on EOF.


[View source]