Class: OoxmlParser::TableBorders
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TableBorders
- Defined in:
- lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
Overview
Class for describing Table Border Propertie
Instance Attribute Summary collapse
-
#bottom ⇒ BordersProperties
Bottom border property.
-
#inside_horizontal ⇒ BordersProperties
Inside horizontal property.
-
#inside_vertical ⇒ BordersProperties
Inside vertical property.
-
#left ⇒ BordersProperties
Left border property.
-
#right ⇒ BordersProperties
Right border property.
-
#top ⇒ BordersProperties
Top border property.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ TableBorders
Parse Table Borders data.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, #initialize, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#bottom ⇒ BordersProperties
Returns bottom border property.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 11 def bottom @bottom end |
#inside_horizontal ⇒ BordersProperties
Returns inside horizontal property.
15 16 17 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 15 def inside_horizontal @inside_horizontal end |
#inside_vertical ⇒ BordersProperties
Returns inside vertical property.
13 14 15 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 13 def inside_vertical @inside_vertical end |
#left ⇒ BordersProperties
Returns left border property.
5 6 7 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 5 def left @left end |
#right ⇒ BordersProperties
Returns right border property.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 7 def right @right end |
#top ⇒ BordersProperties
Returns top border property.
9 10 11 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 9 def top @top end |
Instance Method Details
#parse(node) ⇒ TableBorders
Parse Table Borders data
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 20 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'left' @left = BordersProperties.new(parent: self).parse(node_child) when 'top' @top = BordersProperties.new(parent: self).parse(node_child) when 'right' @right = BordersProperties.new(parent: self).parse(node_child) when 'bottom' @bottom = BordersProperties.new(parent: self).parse(node_child) when 'insideV' @inside_vertical = BordersProperties.new(parent: self).parse(node_child) when 'insideH' @inside_horizontal = BordersProperties.new(parent: self).parse(node_child) end end self end |