module RailsConnector class ObjData def value_of(attribute_name) value_and_type_of(attribute_name).first end def type_of(attribute_name) value_and_type_of(attribute_name).second end def value_and_type_of(attribute_name) raise "implement in subclass" end def has_custom_attribute?(name) raise "implement in subclass" end private def type_of_internal(key) case key when "_text_links" "linklist" when "_valid_from", "_valid_until", "_last_changed" "date" when "title", "body" "html" when "blob" "binary" else nil end end def default_attribute_value(attribute_type) case attribute_type when "linklist" [] when "multienum" [] else nil end end end end