class DatastaxRails::XmlSerializer::Attribute
Implementation of ActiveModel's XML Serializer Attribute
Protected Instance Methods
compute_type()
click to toggle source
Calls superclass method
# File lib/datastax_rails/serializers/xml_serializer.rb, line 233 def compute_type klass = @serializable.class type = if klass.serialized_attributes.key?(name.to_sym) super elsif klass.attribute_definitions.key?(name.to_sym) klass.attribute_definitions[name.to_sym].type else NilClass end { text: :string, time: :datetime, set: :array, list: :array }[type] || type end