Class: OoxmlParser::TableCellLine
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TableCellLine
- Defined in:
- lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb
Overview
Class for parsing Table Cell Lines
Instance Attribute Summary collapse
-
#align ⇒ Object
Returns the value of attribute align.
-
#cap_type ⇒ Object
Returns the value of attribute cap_type.
-
#compound_line_type ⇒ Object
Returns the value of attribute compound_line_type.
-
#dash ⇒ Object
Returns the value of attribute dash.
-
#fill ⇒ Object
Returns the value of attribute fill.
-
#head_end ⇒ Object
Returns the value of attribute head_end.
-
#line_join ⇒ Object
Returns the value of attribute line_join.
-
#tail_end ⇒ Object
Returns the value of attribute tail_end.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(fill = nil, line_join = nil, parent: nil) ⇒ TableCellLine
constructor
A new instance of TableCellLine.
-
#parse(node) ⇒ TableCellLine
Parse TableCellLine object.
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(fill = nil, line_join = nil, parent: nil) ⇒ TableCellLine
Returns a new instance of TableCellLine.
9 10 11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 9 def initialize(fill = nil, line_join = nil, parent: nil) @fill = fill @line_join = line_join super(parent: parent) end |
Instance Attribute Details
#align ⇒ Object
Returns the value of attribute align.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 7 def align @align end |
#cap_type ⇒ Object
Returns the value of attribute cap_type.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 7 def cap_type @cap_type end |
#compound_line_type ⇒ Object
Returns the value of attribute compound_line_type.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 7 def compound_line_type @compound_line_type end |
#dash ⇒ Object
Returns the value of attribute dash.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 7 def dash @dash end |
#fill ⇒ Object
Returns the value of attribute fill.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 7 def fill @fill end |
#head_end ⇒ Object
Returns the value of attribute head_end.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 7 def head_end @head_end end |
#line_join ⇒ Object
Returns the value of attribute line_join.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 7 def line_join @line_join end |
#tail_end ⇒ Object
Returns the value of attribute tail_end.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 7 def tail_end @tail_end end |
#width ⇒ Object
Returns the value of attribute width.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 7 def width @width end |
Instance Method Details
#parse(node) ⇒ TableCellLine
Parse TableCellLine object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 18 def parse(node) @fill = PresentationFill.new(parent: self).parse(node) @line_join = LineJoin.new(parent: self).parse(node) node.attributes.each do |key, value| case key when 'w' @width = OoxmlSize.new(value.value.to_f, :emu) when 'algn' @align = value_to_symbol(value) end end node.xpath('*').each do |node_child| case node_child.name when 'headEnd' @head_end = LineEnd.new(parent: self).parse(node_child) when 'tailEnd' @tail_end = LineEnd.new(parent: self).parse(node_child) when 'ln' return TableCellLine.new(parent: self).parse(node_child) end end self end |