Class: Bignum
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.from_xapian_fu_storage_value(value) ⇒ Object
25 26 27 |
# File 'lib/xapian_fu/xapian_doc_value_accessor.rb', line 25 def self.from_xapian_fu_storage_value(value) value.unpack("G").first.truncate rescue nil end |
.to_xapian_fu_storage_value(value) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/xapian_fu/xapian_doc_value_accessor.rb', line 18 def self.to_xapian_fu_storage_value(value) if value > 0x1fffffffffffff or value < -0x1fffffffffffff raise XapianFu::ValueOutOfBounds end [value].pack("G") end |