Sha256: 92a76efa3e76c0efe516d3ab294655aae69f3f1a8626ee4643936987d51c5adf

Contents?: true

Size: 809 Bytes

Versions: 27

Compression:

Stored size: 809 Bytes

Contents

# frozen_string_literal: true

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

    def initialize(params = {})
      @name = params[:name]
      @q_format = params.fetch(:q_format, false)
      @hidden = params.fetch(:hidden, false)
      super(parent: params[: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

27 entries across 27 versions & 1 rubygems

Version Path
ooxml_parser-0.28.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.27.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.26.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.25.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.24.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.23.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.22.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.21.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.20.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.19.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.18.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.18.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.17.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.16.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.15.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.14.2 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.14.1-mingw32 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.14.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.14.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
ooxml_parser-0.13.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb