Sha256: 0a74a728c520f0e666090db8b2daab76d59467f144c78e1ef05beeff92d06113

Contents?: true

Size: 278 Bytes

Versions: 11

Compression:

Stored size: 278 Bytes

Contents

module XDR::Float
  extend XDR::Concerns::ConvertsToXDR
  extend XDR::Concerns::FloatConverter

  def self.write(val, io)
    raise XDR::WriteError unless val.is_a?(Float)
    io.write [val].pack("g")
  end

  def self.read(io)
    read_bytes(io, 4).unpack("g").first
  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
payshares-xdr-0.0.2 lib/xdr/float.rb
xdr-3.0.2 lib/xdr/float.rb
xdr-3.0.1 lib/xdr/float.rb
xdr-3.0.0 lib/xdr/float.rb
xdr-2.0.0 lib/xdr/float.rb
xdr-1.0.0 lib/xdr/float.rb
xdr-0.1.0 lib/xdr/float.rb
xdr-0.0.4 lib/xdr/float.rb
xdr-0.0.3 lib/xdr/float.rb
xdr-0.0.2 lib/xdr/float.rb
xdr-0.0.1 lib/xdr/float.rb