Class: OoxmlParser::Location
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::Location
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
Overview
Class for parsing <location> tag
Instance Attribute Summary collapse
-
#first_data_column ⇒ Integer
readonly
First data column.
-
#first_data_row ⇒ Integer
readonly
First data row.
-
#first_header_row ⇒ Integer
readonly
First header row.
-
#ref ⇒ String
readonly
Ref of location.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ Location
Parse ‘<location>` tag.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#first_data_column ⇒ Integer (readonly)
Returns first data column.
13 14 15 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb', line 13 def first_data_column @first_data_column end |
#first_data_row ⇒ Integer (readonly)
Returns first data row.
11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb', line 11 def first_data_row @first_data_row end |
#first_header_row ⇒ Integer (readonly)
Returns first header row.
9 10 11 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb', line 9 def first_header_row @first_header_row end |
#ref ⇒ String (readonly)
Returns ref of location.
7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb', line 7 def ref @ref end |
Instance Method Details
#parse(node) ⇒ Location
Parse ‘<location>` tag
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb', line 18 def parse(node) node.attributes.each do |key, value| case key when 'ref' @ref = value.value.to_s when 'firstHeaderRow' @first_header_row = value.value.to_i when 'firstDataRow' @first_data_row = value.value.to_i when 'firstDataCol' @first_data_column = value.value.to_i end end self end |