lib/xdr/concerns/converts_to_xdr.rb
def to_xdr(val)
    StringIO.
      new.
      tap{|io| write(val, io)}.
      string.force_encoding("ASCII-8BIT")
  end
# 
# Serialized the provided val to xdr, returning a string
# of the serialized data
# 
# @param val [Object] the value to serialize
# 
# @return [String] the produced bytes
Serialized the provided val to xdr, returning a string
of the serialized data
Serialized the provided val to xdr returning a string of the serialized data
def to_xdr(val)
    StringIO.
      new.
      tap{|io| write(val, io)}.
      string.force_encoding("ASCII-8BIT")
  end
def to_xdr ( val ) StringIO . new . tap { | io | write ( val , io ) } . string . force_encoding ( "ASCII-8BIT" ) end
Serialized the provided val to xdr, returning a string
of the serialized data
Serialized the provided val to xdr returning a string of the serialized data
the produced bytes
the produced bytes
String
val
the value to serialize
the value to serialize