Class: OoxmlParser::SheetFormatProperties
- Inherits:
-
Object
- Object
- OoxmlParser::SheetFormatProperties
- Defined in:
- lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_format_properties.rb
Instance Attribute Summary collapse
-
#default_column_width ⇒ Object
Returns the value of attribute default_column_width.
-
#default_row_height ⇒ Object
Returns the value of attribute default_row_height.
Class Method Summary collapse
-
.parse(node) ⇒ SheetFormatProperties
Parse SheetFormatProperties.
Instance Method Summary collapse
-
#initialize(column_width = nil, row_height = nil) ⇒ SheetFormatProperties
constructor
A new instance of SheetFormatProperties.
Constructor Details
#initialize(column_width = nil, row_height = nil) ⇒ SheetFormatProperties
Returns a new instance of SheetFormatProperties.
6 7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_format_properties.rb', line 6 def initialize(column_width = nil, row_height = nil) @default_column_width = column_width @default_row_height = row_height end |
Instance Attribute Details
#default_column_width ⇒ Object
Returns the value of attribute default_column_width.
4 5 6 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_format_properties.rb', line 4 def default_column_width @default_column_width end |
#default_row_height ⇒ Object
Returns the value of attribute default_row_height.
4 5 6 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_format_properties.rb', line 4 def default_row_height @default_row_height end |
Class Method Details
.parse(node) ⇒ SheetFormatProperties
Parse SheetFormatProperties
14 15 16 17 18 19 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_format_properties.rb', line 14 def self.parse(node) format_properties = SheetFormatProperties.new format_properties.default_column_width = node.attribute('defaultColWidth').value.to_f format_properties.default_row_height = node.attribute('defaultRowHeight').value.to_f format_properties end |