Class: OoxmlParser::Pane

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_view/pane.rb

Overview

Class for ‘pane` data

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?

Methods included from OoxmlObjectAttributeHelper

#attribute_enabled?, #option_enabled?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

This class inherits a constructor from OoxmlParser::OOXMLDocumentObject

Instance Attribute Details

#stateObject

Returns the value of attribute state.



6
7
8
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_view/pane.rb', line 6

def state
  @state
end

#top_left_cellObject

Returns the value of attribute top_left_cell.



6
7
8
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_view/pane.rb', line 6

def top_left_cell
  @top_left_cell
end

#x_splitObject

Returns the value of attribute x_split.



6
7
8
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_view/pane.rb', line 6

def x_split
  @x_split
end

#y_splitObject

Returns the value of attribute y_split.



6
7
8
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_view/pane.rb', line 6

def y_split
  @y_split
end

Instance Method Details

#parse(node) ⇒ Pane

Parse Pane object

Parameters:

  • node (Nokogiri::XML:Element)

    node to parse

Returns:

  • (Pane)

    result of parsing



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_view/pane.rb', line 11

def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'state'
      @state = value.value.to_sym
    when 'topLeftCell'
      @top_left_cell = Coordinates.new.parse_string(value.value)
    when 'xSplit'
      @x_split = value.value
    when 'ySplit'
      @y_split = value.value
    end
  end
  self
end