class OoxmlParser::Background
Class for parsing ‘bg` tag
Attributes
@return [BackgroundProperties] properties
Public Class Methods
Source
# File lib/ooxml_parser/pptx_parser/presentation/slide/background.rb, line 11 def initialize(type = nil, parent: nil) @type = type super(parent: parent) end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/pptx_parser/presentation/slide/background.rb, line 19 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'bgPr' @properties = BackgroundProperties.new(parent: self).parse(node_child) end end background_properties_node = node.xpath('p:bgPr').first if background_properties_node @shade_to_title = attribute_enabled?(background_properties_node, 'shadeToTitle') @fill = PresentationFill.new(parent: self).parse(background_properties_node) end self end
Parse Background
object @param node [Nokogiri::XML:Element] node to parse @return [Background] result of parsing