lib/junoser/xsd/element.rb in junoser-0.3.3 vs lib/junoser/xsd/element.rb in junoser-0.3.4
- old
+ new
@@ -84,8 +84,21 @@
if xml['type'] =~ /^xsd:.*/
xml.remove_attribute 'type'
'arg'
end
end
+
+ def format(header, content = nil, footer = nil)
+ if documentation
+ header += " /* #{documentation} */"
+ end
+
+ super(header, content, footer)
+ end
+
+ def documentation
+ @documentation ||= xml.xpath('./xsd:annotation/xsd:documentation').text
+ @documentation.empty? ? nil : @documentation
+ end
end
end
end