Class: XapianDb::TypeCodec::StringCodec
- Inherits:
-
Object
- Object
- XapianDb::TypeCodec::StringCodec
- Defined in:
- lib/type_codec.rb
Class Method Summary collapse
-
.decode(string) ⇒ String
Decode a string.
-
.encode(object) ⇒ String
Encode an object to a string.
Class Method Details
.decode(string) ⇒ String
Decode a string
66 67 68 |
# File 'lib/type_codec.rb', line 66 def self.decode(string) string.force_encoding("UTF-8") end |
.encode(object) ⇒ String
Encode an object to a string
59 60 61 |
# File 'lib/type_codec.rb', line 59 def self.encode(object) object.to_s end |