Sha256: 45fd5cc0db633e9038888a525943d69cec8c2c89e5a2de56d06c1f4d55372653

Contents?: true

Size: 671 Bytes

Versions: 43

Compression:

Stored size: 671 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)
        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

43 entries across 43 versions & 1 rubygems

Version Path
ooxml_parser-0.6.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.5.1 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.5.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb