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
#==, #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
#bottom ⇒ BordersProperties
Returns bottom border property.
13 14 15 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 13 def bottom @bottom end |
#inside_horizontal ⇒ BordersProperties
Returns inside horizontal property.
17 18 19 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 17 def inside_horizontal @inside_horizontal end |
#inside_vertical ⇒ BordersProperties
Returns inside vertical property.
15 16 17 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 15 def inside_vertical @inside_vertical end |
#left ⇒ BordersProperties
Returns left border property.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 7 def left @left end |
#right ⇒ BordersProperties
Returns right border property.
9 10 11 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 9 def right @right end |
#top ⇒ BordersProperties
Returns top border property.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 11 def top @top end |
Instance Method Details
#parse(node) ⇒ TableBorders
Parse Table Borders data
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb', line 22 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 |