Class: OoxmlParser::WorkbookProperties
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::WorkbookProperties
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/workbook_properties.rb
Overview
Class for parsing <workbookPr> tag
Instance Attribute Summary collapse
-
#date1904 ⇒ True, False
readonly
Specifies if 1904 date system is used in workbook.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ WorkbookProperties
constructor
A new instance of WorkbookProperties.
-
#parse(node) ⇒ WorkbookProperties
Parse WorkbookProperties data.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(parent: nil) ⇒ WorkbookProperties
Returns a new instance of WorkbookProperties.
9 10 11 12 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/workbook_properties.rb', line 9 def initialize(parent: nil) @date1904 = false super end |
Instance Attribute Details
#date1904 ⇒ True, False (readonly)
Returns Specifies if 1904 date system is used in workbook.
7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/workbook_properties.rb', line 7 def date1904 @date1904 end |
Instance Method Details
#parse(node) ⇒ WorkbookProperties
Parse WorkbookProperties data
17 18 19 20 21 22 23 24 25 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/workbook_properties.rb', line 17 def parse(node) node.attributes.each do |key, value| case key when 'date1904' @date1904 = boolean_attribute_value(value) end end self end |