class XapianDb::TypeCodec::BooleanCodec

Public Class Methods

decode(string) click to toggle source

Decode a string representing a boolean @param [String] string a string @return [Boolean] the boolean value

   # File lib/type_codec.rb
83 def self.decode(string)
84   string == "true"
85 end
encode(value) click to toggle source

Encode a boolean value to a string @param [Object] value a value to encode @return [String] the string

   # File lib/type_codec.rb
76 def self.encode(value)
77   value.to_s
78 end