Class: OoxmlParser::NaryProperties

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/nary/nary_properties.rb

Overview

Class for parsing ‘m:naryPr` object

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?

Methods included from OoxmlObjectAttributeHelper

#attribute_enabled?, #option_enabled?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

This class inherits a constructor from OoxmlParser::OOXMLDocumentObject

Instance Attribute Details

#growNaryGrow

Returns grow value.

Returns:



9
10
11
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/nary/nary_properties.rb', line 9

def grow
  @grow
end

#limit_locationNaryLimitLocation

Returns nary limit location.

Returns:



11
12
13
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/nary/nary_properties.rb', line 11

def limit_location
  @limit_location
end

Instance Method Details

#parse(node) ⇒ NaryProperties

Parse NaryProperties

Parameters:

  • node (Nokogiri::XML:Node)

    with NaryProperties

Returns:



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/nary/nary_properties.rb', line 16

def parse(node)
  node.xpath('*').each do |nary_pr_child|
    case nary_pr_child.name
    when 'grow'
      @grow = NaryGrow.new(parent: self).parse(nary_pr_child)
    when 'limLoc'
      @limit_location = NaryLimitLocation.new(parent: self).parse(nary_pr_child)
    end
  end
  self
end