Sha256: a9759e172e496ef5a2864c90e2f34df5936148104a57ad088bfa58dd156c6c3f

Contents?: true

Size: 812 Bytes

Versions: 4

Compression:

Stored size: 812 Bytes

Contents

# Style Parameter Data
module OoxmlParser
  class StyleParametres < OOXMLDocumentObject
    attr_accessor :q_format, :hidden, :name

    def initialize(name = nil,
                   q_format = false,
                   hidden = false,
                   parent: nil)
      @name = name
      @q_format = q_format
      @hidden = hidden
      @parent = parent
    end

    # Parse StyleParametres data
    # @param [Nokogiri::XML:Element] node with StyleParametres data
    # @return [StyleParametres] value of Columns data
    def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'name'
          @name = node_child.attribute('val').value
        when 'qFormat'
          @q_format = option_enabled?(node_child)
        end
      end
      self
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ooxml_parser-0.4.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.4.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.3.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.2.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb