Class: Time
- Defined in:
- lib/xapian_fu/xapian_doc.rb,
lib/xapian_fu/xapian_doc_value_accessor.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_xapian_fu_storage_value(value) ⇒ Object
56 57 58 |
# File 'lib/xapian_fu/xapian_doc_value_accessor.rb', line 56 def self.from_xapian_fu_storage_value(value) Time.at(value.unpack("G").first) rescue nil end |
.to_xapian_fu_storage_value(value) ⇒ Object
52 53 54 |
# File 'lib/xapian_fu/xapian_doc_value_accessor.rb', line 52 def self.to_xapian_fu_storage_value(value) [value.utc.to_f].pack("G") end |
Instance Method Details
#to_xapian_fu_string ⇒ Object
2 3 4 |
# File 'lib/xapian_fu/xapian_doc.rb', line 2 def to_xapian_fu_string utc.strftime("%Y%m%d%H%M%S") end |