lib/scaffold_parser/scaffolders/xsd/parser/handlers/module.rb in scaffold_parser-0.8.0 vs lib/scaffold_parser/scaffolders/xsd/parser/handlers/module.rb in scaffold_parser-0.9.0
- old
+ new
@@ -63,12 +63,10 @@
template.namespaces = ['Groups'].compact
meth = StringIO.new
meth.puts " def builder"
meth.puts " root = Ox::Element.new(name)"
- meth.puts " if data.key? :attributes"
- meth.puts " data[:attributes].each { |k, v| root[k] = v }"
- meth.puts " end"
+ meth.puts " root = add_attributes_and_namespaces(root)"
meth.puts
meth.puts methods.map { |method| indent(indent(method.to_builder.lines)).join }.join("\n")
meth.puts
meth.puts " root"
meth.puts " end"