Sha256: b8eec8c604b8801bbf112d638f0e9c42d742fda883c235f0006ada17f338e092

Contents?: true

Size: 700 Bytes

Versions: 5

Compression:

Stored size: 700 Bytes

Contents

# frozen_string_literal: true

require_relative 'table_cell_line'
module OoxmlParser
  # Border Data
  class Border < OOXMLDocumentObject
    attr_accessor :style, :color

    # Parse Border object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [Border] result of parsing
    def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'style'
          @style = value_to_symbol(value) unless value.value == 'none'
        end
      end

      node.xpath('*').each do |node_child|
        case node_child.name
        when 'color'
          @color = OoxmlColor.new(parent: self).parse(node_child)
        end
      end
      self
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ooxml_parser-0.37.1 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.37.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.36.1 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.36.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.35.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb