Class: OoxmlParser::XlsxDrawingPositionParameters
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::XlsxDrawingPositionParameters
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb
Overview
Class for parsing offset of drawing ‘xdr:from`, `xdr:to`
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#column_offset ⇒ Object
Returns the value of attribute column_offset.
-
#row ⇒ Object
Returns the value of attribute row.
-
#row_offset ⇒ Object
Returns the value of attribute row_offset.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ XlsxDrawingPositionParameters
Parse XlsxDrawingPositionParameters object.
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
#column ⇒ Object
Returns the value of attribute column.
6 7 8 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 6 def column @column end |
#column_offset ⇒ Object
Returns the value of attribute column_offset.
6 7 8 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 6 def column_offset @column_offset end |
#row ⇒ Object
Returns the value of attribute row.
6 7 8 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 6 def row @row end |
#row_offset ⇒ Object
Returns the value of attribute row_offset.
6 7 8 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 6 def row_offset @row_offset end |
Instance Method Details
#parse(node) ⇒ XlsxDrawingPositionParameters
Parse XlsxDrawingPositionParameters object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 11 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'col' @column = Coordinates.get_column_name(node_child.text.to_i + 1) when 'colOff' @column_offset = OoxmlSize.new(node_child.text.to_f, :emu) when 'row' @row = node_child.text.to_i + 1 when 'rowOff' @row_offset = OoxmlSize.new(node_child.text.to_f, :emu) end end self end |