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
Constant Summary
Constants inherited from OOXMLDocumentObject
OOXMLDocumentObject::DEFAULT_DIRECTORY_FOR_MEDIA
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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fill = nil, line_join = nil) ⇒ TableCellLine
constructor
A new instance of TableCellLine.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, copy_media_file, current_xml, dir, encrypted_file?, get_link_from_rels, media_folder, option_enabled?, unzip_file
Constructor Details
#initialize(fill = nil, line_join = nil) ⇒ TableCellLine
Returns a new instance of TableCellLine.
5 6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 5 def initialize(fill = nil, line_join = nil) @fill = fill @line_join = line_join end |
Instance Attribute Details
#align ⇒ Object
Returns the value of attribute align.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 3 def align @align end |
#cap_type ⇒ Object
Returns the value of attribute cap_type.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 3 def cap_type @cap_type end |
#compound_line_type ⇒ Object
Returns the value of attribute compound_line_type.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 3 def compound_line_type @compound_line_type end |
#dash ⇒ Object
Returns the value of attribute dash.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 3 def dash @dash end |
#fill ⇒ Object
Returns the value of attribute fill.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 3 def fill @fill end |
#head_end ⇒ Object
Returns the value of attribute head_end.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 3 def head_end @head_end end |
#line_join ⇒ Object
Returns the value of attribute line_join.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 3 def line_join @line_join end |
#tail_end ⇒ Object
Returns the value of attribute tail_end.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 3 def tail_end @tail_end end |
#width ⇒ Object
Returns the value of attribute width.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 3 def width @width end |
Class Method Details
.parse(border_node) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb', line 10 def self.parse(border_node) line = TableCellLine.new(PresentationFill.parse(border_node), LineJoin.parse(border_node)) border_node.xpath('*').each do |border_node_child| case border_node_child.name when 'prstDash' when 'custDash' when 'headEnd' line.head_end = LineEnd.parse(border_node_child) when 'tailEnd' line.tail_end = LineEnd.parse(border_node_child) when 'ln' return TableCellLine.parse(border_node_child) end end border_node.attributes.each do |key, value| case key when 'w' line.width = value.value.to_f / 12_700.0 when 'algn' line.align = Alignment.parse(value) end end line end |