module CouchPillow module TypeDirective # Sets the type of this Document. # def type value @type = value.to_s end def _doc_type @type ||= "couchpillow" end # Helper method to sanitize an id string # def _sanitize_id id key = "#{_doc_type}::" id = id.to_s id.start_with?(key) and id = id[key.length..-1] or id end end end