Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Upgrade to the improved property api
Browse files Browse the repository at this point in the history
  • Loading branch information
solnic committed Sep 12, 2011
1 parent 6608360 commit 45eec69
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/dm-serializer/to_xml.rb
Expand Up @@ -37,8 +37,10 @@ def to_xml_document(opts={}, doc = nil)
value = __send__(property.name)
attrs = {}

unless property.primitive == String
attrs['type'] = property.primitive.to_s.downcase
dump_class = property.dump_class

unless dump_class == ::String
attrs['type'] = dump_class.to_s.downcase
end

xml.add_node(root, property.name.to_s, value, attrs)
Expand Down

0 comments on commit 45eec69

Please sign in to comment.