class XapianDb::TypeCodec::StringCodec

Public Class Methods

decode(string) click to toggle source

Decode a string @param [String] string a string @return [String] the string

   # File lib/type_codec.rb
66 def self.decode(string)
67   string.force_encoding("UTF-8")
68 end
encode(object) click to toggle source

Encode an object to a string @param [Object] object an object to encode @return [String] the string

   # File lib/type_codec.rb
59 def self.encode(object)
60   object.to_s
61 end