class OoxmlParser::GridSpan

Class for describing `gridSpan` tag

Attributes

type[R]

@return [String] type of grid span

value[R]

@return [String] value of grid span merged cells

Public Class Methods

new(parent: nil) click to toggle source
Calls superclass method OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/common_parser/common_data/table/row/cell/grid_span.rb, line 11
def initialize(parent: nil)
  @type = 'horizontal'
  super
end

Public Instance Methods

parse(node) click to toggle source

Parse Grid Span data @param [Nokogiri::XML:Element] node with GridSpan data @return [GridSpan] value of GridSpan

# File lib/ooxml_parser/common_parser/common_data/table/row/cell/grid_span.rb, line 19
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'val'
      @value = value.value.to_i
    end
  end
  self
end