Method: NFS::XDR::DynamicString#decode

Defined in:
lib/nfs/xdr.rb

#decode(string) ⇒ Object



122
123
124
125
126
# File 'lib/nfs/xdr.rb', line 122

def decode(string)
  length = @length.decode(string)
  superstring = string.slice!(0, XDR.pad(length, 4))
  superstring.nil? ? '' : superstring[0, length]
end