lib/prawn/svg/elements/depth_first_base.rb in prawn-svg-0.34.2 vs lib/prawn/svg/elements/depth_first_base.rb in prawn-svg-0.35.0
- old
+ new
@@ -11,11 +11,11 @@
rescue SkipElementError => e
@document.warnings << e.message
end
def parse_and_apply
- raise "unsupported"
+ raise 'unsupported'
end
protected
def parse_step
@@ -34,14 +34,14 @@
def parse_child_elements
return unless source
svg_child_elements.each do |elem|
- if element_class = Prawn::SVG::Elements::TAG_CLASS_MAPPING[elem.name.to_sym]
- child = element_class.new(@document, elem, @calls, state.dup)
- child.parse_step
- @children << child
- end
+ next unless (element_class = Prawn::SVG::Elements::TAG_CLASS_MAPPING[elem.name.to_sym])
+
+ child = element_class.new(@document, elem, @calls, state.dup)
+ child.parse_step
+ @children << child
end
end
def apply_child_elements
@children.each do |child|