Sha256: 0d7751766d721ecc01d142d61ef2418dedda46fb97ec844de1328a568b118e52
Contents?: true
Size: 871 Bytes
Versions: 31
Compression:
Stored size: 871 Bytes
Contents
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
Version data entries
31 entries across 31 versions & 1 rubygems