class OoxmlParser::SizeRelativeHorizontal
Class for parsing ‘wp14:sizeRelH` object
Attributes
@return [Symbol] type from which is relative
@return [PictureWidth] width class
Public Instance Methods
Source
# File lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/size_relative_horizontal.rb, line 15 def parse(node) node.attributes.each do |key, value| case key when 'relativeFrom' @relative_from = value_to_symbol(value) end end node.xpath('*').each do |preset_geometry_child| case preset_geometry_child.name when 'pctWidth' @width = PictureDimension.new(parent: self).parse(preset_geometry_child) end end self end
Parse SizeRelativeHeight @param [Nokogiri::XML:Node] node with SizeRelativeHeight @return [SizeRelativeHorizontal] result of parsing