Class: OoxmlParser::XlsxBorder
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::XlsxBorder
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/style_sheet/xlsx_borders/xlsx_border.rb
Overview
Class for parsing ‘border`
Instance Attribute Summary collapse
-
#bottom ⇒ Border
readonly
Value of border.
-
#left ⇒ Border
readonly
Value of border.
-
#right ⇒ Border
readonly
Value of border.
-
#top ⇒ Border
readonly
Value of border.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ XlsxBorder
Parse XlsxBorder 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 ⇒ Border (readonly)
Returns value of border.
13 14 15 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/style_sheet/xlsx_borders/xlsx_border.rb', line 13 def bottom @bottom end |
#left ⇒ Border (readonly)
Returns value of border.
7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/style_sheet/xlsx_borders/xlsx_border.rb', line 7 def left @left end |
#right ⇒ Border (readonly)
Returns value of border.
9 10 11 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/style_sheet/xlsx_borders/xlsx_border.rb', line 9 def right @right end |
#top ⇒ Border (readonly)
Returns value of border.
11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/style_sheet/xlsx_borders/xlsx_border.rb', line 11 def top @top end |
Instance Method Details
#parse(node) ⇒ XlsxBorder
Parse XlsxBorder data
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/style_sheet/xlsx_borders/xlsx_border.rb', line 18 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'bottom' @bottom = Border.new(parent: self).parse(node_child) when 'top' @top = Border.new(parent: self).parse(node_child) when 'right' @right = Border.new(parent: self).parse(node_child) when 'left' @left = Border.new(parent: self).parse(node_child) end end self end |