class Prawn::SVG::Elements::DepthFirstBase
Public Class Methods
Source
# File lib/prawn/svg/elements/depth_first_base.rb, line 2 def initialize(document, source, parent_calls, state) super @base_calls = @calls = @parent_calls end
Calls superclass method
Prawn::SVG::Elements::Base::new
Public Instance Methods
Source
# File lib/prawn/svg/elements/depth_first_base.rb, line 15 def parse_and_apply raise 'unsupported' end
Source
# File lib/prawn/svg/elements/depth_first_base.rb, line 7 def process parse_step apply_step(calls) rescue SkipElementQuietly rescue SkipElementError => e @document.warnings << e.message end
Protected Instance Methods
Source
# File lib/prawn/svg/elements/depth_first_base.rb, line 47 def apply_child_elements @children.each do |child| child.apply_step(calls) end end
Source
# File lib/prawn/svg/elements/depth_first_base.rb, line 28 def apply_step(calls) @base_calls = @calls = calls apply_calls_from_standard_attributes apply apply_child_elements if container? end
Source
# File lib/prawn/svg/elements/depth_first_base.rb, line 35 def parse_child_elements return unless source svg_child_elements.each do |elem| 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
Source
# File lib/prawn/svg/elements/depth_first_base.rb, line 21 def parse_step extract_attributes_and_properties parse_standard_attributes parse parse_child_elements if container? end