class OoxmlParser::TableLook

Describe look of table, parsed ‘w:tblLook`

Attributes

banding_column[RW]
banding_row[RW]
first_column[RW]
first_row[RW]
last_column[RW]
last_row[RW]
no_horizontal_banding[RW]
no_vertical_banding[RW]

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/properties/table_look.rb, line 9
def initialize(parent: nil)
  @first_row = false
  @first_column = false
  @last_row = false
  @last_column = false
  @banding_row = false
  @banding_column = false
  @no_horizontal_banding = false
  @no_horizontal_banding = false
  super
end

Public Instance Methods

parse(node) click to toggle source

Parse TableLook object @param node [Nokogiri::XML:Element] node to parse @return [TableLook] result of parsing

# File lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb, line 24
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'firstRow'
      @first_row = attribute_enabled?(value)
    when 'lastRow'
      @last_row = attribute_enabled?(value)
    when 'firstCol', 'firstColumn'
      @first_column = attribute_enabled?(value)
    when 'lastCol', 'lastColumn'
      @last_column = attribute_enabled?(value)
    when 'noHBand'
      @no_horizontal_banding = attribute_enabled?(value)
    when 'noVBand'
      @no_vertical_banding = attribute_enabled?(value)
    when 'bandRow'
      @banding_row = attribute_enabled?(value)
    when 'bandCol'
      @banding_column = attribute_enabled?(value)
    end
  end
  self
end