Class: OoxmlParser::WorksheetSource
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::WorksheetSource
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_source/worksheet_source.rb
Overview
Class for parsing <worksheetSource> file
Instance Attribute Summary collapse
-
#ref ⇒ String
readonly
Ref of cells.
-
#sheet ⇒ String
readonly
Sheet name.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ WorksheetSource
Parse ‘<worksheetSource>` tag # @param [Nokogiri::XML:Element] node with WorksheetSource data.
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
#ref ⇒ String (readonly)
Returns ref of cells.
7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_source/worksheet_source.rb', line 7 def ref @ref end |
#sheet ⇒ String (readonly)
Returns sheet name.
9 10 11 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_source/worksheet_source.rb', line 9 def sheet @sheet end |
Instance Method Details
#parse(node) ⇒ WorksheetSource
Parse ‘<worksheetSource>` tag # @param [Nokogiri::XML:Element] node with WorksheetSource data
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_source/worksheet_source.rb', line 14 def parse(node) node.attributes.each do |key, value| case key when 'ref' @ref = value.value.to_s when 'sheet' @sheet = value.value.to_s end end self end |