Class: OoxmlParser::TableLook
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TableLook
- Defined in:
- lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb
Constant Summary
Constants inherited from OOXMLDocumentObject
OOXMLDocumentObject::DEFAULT_DIRECTORY_FOR_MEDIA
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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ TableLook
constructor
A new instance of TableLook.
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 ⇒ TableLook
Returns a new instance of TableLook.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 7 def initialize @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 end |
Instance Attribute Details
#banding_column ⇒ Object
Returns the value of attribute banding_column.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4 def banding_column @banding_column end |
#banding_row ⇒ Object
Returns the value of attribute banding_row.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4 def banding_row @banding_row end |
#first_column ⇒ Object
Returns the value of attribute first_column.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4 def first_column @first_column end |
#first_row ⇒ Object
Returns the value of attribute first_row.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4 def first_row @first_row end |
#last_column ⇒ Object
Returns the value of attribute last_column.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4 def last_column @last_column end |
#last_row ⇒ Object
Returns the value of attribute last_row.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4 def last_row @last_row end |
#no_horizontal_banding ⇒ Object
Returns the value of attribute no_horizontal_banding.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4 def no_horizontal_banding @no_horizontal_banding end |
#no_vertical_banding ⇒ Object
Returns the value of attribute no_vertical_banding.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4 def no_vertical_banding @no_vertical_banding end |
Class Method Details
.parse(table_look_node) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 18 def self.parse(table_look_node) table_look = TableLook.new table_look_node.attributes.each do |key, value| case key when 'firstRow' table_look.first_row = OOXMLDocumentObject.option_enabled?(value) when 'lastRow' table_look.last_row = OOXMLDocumentObject.option_enabled?(value) when 'firstCol', 'firstColumn' table_look.first_column = OOXMLDocumentObject.option_enabled?(value) when 'lastCol', 'lastColumn' table_look.last_column = OOXMLDocumentObject.option_enabled?(value) when 'noHBand' table_look.no_horizontal_banding = OOXMLDocumentObject.option_enabled?(value) when 'noVBand' table_look.no_vertical_banding = OOXMLDocumentObject.option_enabled?(value) when 'bandRow' table_look.banding_row = OOXMLDocumentObject.option_enabled?(value) when 'bandCol' table_look.banding_column = OOXMLDocumentObject.option_enabled?(value) end end table_look end |