Sha256: 7484318c6630d8e2ac8aa30b537c4d8dd75a7269e85672291badfdb8fdf6e58d

Contents?: true

Size: 1.5 KB

Versions: 49

Compression:

Stored size: 1.5 KB

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for describing Table Border Propertie
  class TableBorders < OOXMLDocumentObject
    # @return [BordersProperties] left border property
    attr_accessor :left
    # @return [BordersProperties] right border property
    attr_accessor :right
    # @return [BordersProperties] top border property
    attr_accessor :top
    # @return [BordersProperties] bottom border property
    attr_accessor :bottom
    # @return [BordersProperties] inside vertical property
    attr_accessor :inside_vertical
    # @return [BordersProperties] inside horizontal property
    attr_accessor :inside_horizontal

    # Parse Table Borders data
    # @param [Nokogiri::XML:Element] node with Table Borders data
    # @return [TableBorders] value of Table Borders data
    def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'left'
          @left = BordersProperties.new(parent: self).parse(node_child)
        when 'top'
          @top = BordersProperties.new(parent: self).parse(node_child)
        when 'right'
          @right = BordersProperties.new(parent: self).parse(node_child)
        when 'bottom'
          @bottom = BordersProperties.new(parent: self).parse(node_child)
        when 'insideV'
          @inside_vertical = BordersProperties.new(parent: self).parse(node_child)
        when 'insideH'
          @inside_horizontal = BordersProperties.new(parent: self).parse(node_child)
        end
      end
      self
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
ooxml_parser-0.38.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.37.1 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.37.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.36.1 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.36.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.35.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.34.2 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.34.1 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.34.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.33.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.32.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.31.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.30.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.29.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.28.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.27.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.26.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.25.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.24.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
ooxml_parser-0.23.0 lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb