class XapianDb::TypeCodec
Public Class Methods
Source
# File lib/type_codec.rb 19 def self.codec_for(type) 20 begin 21 constantize "XapianDb::TypeCodec::#{camelize("#{type}_codec")}" 22 rescue NameError 23 raise ArgumentError.new "no codec defined for type #{type}" 24 end 25 end
Get the codec for a type @param [Symbol] type a supported type as a string or symbol.
The following types are supported: - :date
@return [DateCodec]