class BerkeleyLibrary::Util::ODS::XML::Table::TableColumn
Attributes
column_style[R]
default_cell_style[R]
Public Class Methods
new(column_style, default_cell_style, number_repeated = 1, table:)
click to toggle source
Initializes a new column
@param column_style
[XML::Style::ColumnStyle] the column style @param default_cell_style
[XML::Style::CellStyle] the default cell style for this column
Calls superclass method
BerkeleyLibrary::Util::ODS::XML::Table::Repeatable::new
# File lib/berkeley_library/util/ods/xml/table/table_column.rb, line 18 def initialize(column_style, default_cell_style, number_repeated = 1, table:) super('table-column', 'number-columns-repeated', number_repeated, table: table) @column_style = column_style @default_cell_style = default_cell_style set_default_attributes! end
Public Instance Methods
has_styles?(column_style, default_cell_style)
click to toggle source
rubocop:disable Naming/PredicateName
# File lib/berkeley_library/util/ods/xml/table/table_column.rb, line 27 def has_styles?(column_style, default_cell_style) self.column_style == column_style && self.default_cell_style == default_cell_style end
Private Instance Methods
set_default_attributes!()
click to toggle source
rubocop:enable Naming/PredicateName
# File lib/berkeley_library/util/ods/xml/table/table_column.rb, line 34 def set_default_attributes! set_attribute('style-name', column_style.style_name) set_attribute('default-cell-style-name', default_cell_style.style_name) end