Class: OoxmlParser::TableLook
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TableLook
- Defined in:
- lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb
Overview
Describe look of table, parsed ‘w:tblLook`
Instance Attribute Summary collapse
-
#banding_column ⇒ Object
Returns the value of attribute banding_column.
-
#banding_row ⇒ Object
Returns the value of attribute banding_row.
-
#first_column ⇒ Object
Returns the value of attribute first_column.
-
#first_row ⇒ Object
Returns the value of attribute first_row.
-
#last_column ⇒ Object
Returns the value of attribute last_column.
-
#last_row ⇒ Object
Returns the value of attribute last_row.
-
#no_horizontal_banding ⇒ Object
Returns the value of attribute no_horizontal_banding.
-
#no_vertical_banding ⇒ Object
Returns the value of attribute no_vertical_banding.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ TableLook
constructor
A new instance of TableLook.
-
#parse(node) ⇒ TableLook
Parse TableLook 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(parent: nil) ⇒ TableLook
Returns a new instance of TableLook.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 9 def initialize(parent: nil) @first_row = false @first_column = false @last_row = false @last_column = false @banding_row = false @banding_column = false @no_horizontal_banding = false @no_horizontal_banding = false super end |
Instance Attribute Details
#banding_column ⇒ Object
Returns the value of attribute banding_column.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 6 def banding_column @banding_column end |
#banding_row ⇒ Object
Returns the value of attribute banding_row.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 6 def banding_row @banding_row end |
#first_column ⇒ Object
Returns the value of attribute first_column.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 6 def first_column @first_column end |
#first_row ⇒ Object
Returns the value of attribute first_row.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 6 def first_row @first_row end |
#last_column ⇒ Object
Returns the value of attribute last_column.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 6 def last_column @last_column end |
#last_row ⇒ Object
Returns the value of attribute last_row.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 6 def last_row @last_row end |
#no_horizontal_banding ⇒ Object
Returns the value of attribute no_horizontal_banding.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 6 def no_horizontal_banding @no_horizontal_banding end |
#no_vertical_banding ⇒ Object
Returns the value of attribute no_vertical_banding.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 6 def no_vertical_banding @no_vertical_banding end |
Instance Method Details
#parse(node) ⇒ TableLook
Parse TableLook object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 24 def parse(node) node.attributes.each do |key, value| case key when 'firstRow' @first_row = attribute_enabled?(value) when 'lastRow' @last_row = attribute_enabled?(value) when 'firstCol', 'firstColumn' @first_column = attribute_enabled?(value) when 'lastCol', 'lastColumn' @last_column = attribute_enabled?(value) when 'noHBand' @no_horizontal_banding = attribute_enabled?(value) when 'noVBand' @no_vertical_banding = attribute_enabled?(value) when 'bandRow' @banding_row = attribute_enabled?(value) when 'bandCol' @banding_column = attribute_enabled?(value) end end self end |