class OoxmlParser::SlideSize

Class for parsing ‘sldSz` tag

Attributes

height[RW]
type[RW]
width[RW]

Public Instance Methods

parse(node) click to toggle source

Parse SlideSize object @param node [Nokogiri::XML:Element] node to parse @return [Bookmark] result of parsing

# File lib/ooxml_parser/pptx_parser/presentation/slide_size.rb, line 11
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'cx'
      @width = OoxmlSize.new(value.value.to_f, :emu)
    when 'cy'
      @height = OoxmlSize.new(value.value.to_f, :emu)
    when 'type'
      @type = value.value.to_sym
    end
  end
  self
end