Sha256: fd4306d28c930f35af648ea10757beefd0ec9359f8ae222f88294d82e7a86807

Contents?: true

Size: 653 Bytes

Versions: 3

Compression:

Stored size: 653 Bytes

Contents

class KJess::Response
  class Value < KJess::Response
    keyword 'VALUE'
    arity    3

    attr_accessor :data

    def queue; args[0]; end
    def flags; args[1].to_i; end
    def bytes; args[2].to_i; end

    # Internal: Read the extra data from the value
    #
    # Read the datablock that is after the value and then the final END marker.
    #
    # Returns nothing
    def read_more( connection )
      read_size  = bytes + CRLF.bytesize
      total_data = connection.read( read_size )
      @data      = total_data[0...bytes]

      line = connection.readline
      KJess::Response.parse( line ) # throw away the 'END' line
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kjess-1.2.0 lib/kjess/response/value.rb
kjess-1.1.0 lib/kjess/response/value.rb
kjess-1.0.0 lib/kjess/response/value.rb