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.34.2 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.34.1 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.34.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.33.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.32.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.31.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.30.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.29.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.28.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.27.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.26.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.25.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.24.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.23.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.22.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.21.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.20.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.19.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.18.1 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb
ooxml_parser-0.18.0 lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb