Class: OoxmlParser::SharedItems
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::SharedItems
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
Overview
Class for parsing <sharedItems> tag
Instance Attribute Summary collapse
-
#contains_integer ⇒ True, False
readonly
Is contains_integer.
-
#contains_number ⇒ True, False
readonly
Is contains_number.
-
#contains_semi_mixed_types ⇒ True, False
readonly
Is contains_semi_mixed_types.
-
#contains_string ⇒ True, False
readonly
Is contains_string.
-
#max_value ⇒ Integer
readonly
Max value.
-
#min_value ⇒ Integer
readonly
Min value.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ sharedItems
Parse ‘<sharedItems>` 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
#contains_integer ⇒ True, False (readonly)
Returns is contains_integer.
13 14 15 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb', line 13 def contains_integer @contains_integer end |
#contains_number ⇒ True, False (readonly)
Returns is contains_number.
11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb', line 11 def contains_number @contains_number end |
#contains_semi_mixed_types ⇒ True, False (readonly)
Returns is contains_semi_mixed_types.
7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb', line 7 def contains_semi_mixed_types @contains_semi_mixed_types end |
#contains_string ⇒ True, False (readonly)
Returns is contains_string.
9 10 11 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb', line 9 def contains_string @contains_string end |
#max_value ⇒ Integer (readonly)
Returns max value.
17 18 19 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb', line 17 def max_value @max_value end |
#min_value ⇒ Integer (readonly)
Returns min value.
15 16 17 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb', line 15 def min_value @min_value end |
Instance Method Details
#parse(node) ⇒ sharedItems
Parse ‘<sharedItems>` tag # @param [Nokogiri::XML:Element] node with WorksheetSource data
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb', line 22 def parse(node) node.attributes.each do |key, value| case key when 'containsSemiMixedTypes' @contains_semi_mixed_types = attribute_enabled?(value) when 'containsString' @contains_string = attribute_enabled?(value) when 'containsNumber' @contains_number = attribute_enabled?(value) when 'containsInteger' @contains_integer = attribute_enabled?(value) when 'minValue' @min_value = value.value.to_i when 'maxValue' @max_value = value.value.to_i end end self end |