Class: Float

Inherits:
Object show all
Defined in:
lib/xapian_fu/xapian_doc_value_accessor.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.from_xapian_fu_storage_value(value) ⇒ Object



41
42
43
# File 'lib/xapian_fu/xapian_doc_value_accessor.rb', line 41

def self.from_xapian_fu_storage_value(value)
  value.unpack("G").first rescue nil
end

.to_xapian_fu_storage_value(value) ⇒ Object



37
38
39
# File 'lib/xapian_fu/xapian_doc_value_accessor.rb', line 37

def self.to_xapian_fu_storage_value(value)
  [value].pack("G")
end