Commit 2ce6f77
Changed files (1)
lib
scale
lib/scale/svg.rb
@@ -15,15 +15,19 @@ module Scale
def to_xml
builder = Nokogiri::XML::Builder.new do |xml|
- xml.svg(attributes) do
- @children.each do |node|
- node.append_to(xml)
- end
- end
+ append_to(xml)
end
builder.to_xml
end
+ def append_to(xml)
+ xml.svg(attributes) do
+ @children.each do |node|
+ node.append_to(xml)
+ end
+ end
+ end
+
private
def attributes