Class: BerkeleyLibrary::Util::ODS::XML::Table::TableColumn
- Inherits:
-
Repeatable
- Object
- ElementNode
- Repeatable
- BerkeleyLibrary::Util::ODS::XML::Table::TableColumn
- Defined in:
- lib/berkeley_library/util/ods/xml/table/table_column.rb
Instance Attribute Summary collapse
-
#column_style ⇒ Object
readonly
Returns the value of attribute column_style.
-
#default_cell_style ⇒ Object
readonly
Returns the value of attribute default_cell_style.
Attributes inherited from Repeatable
#attr_name_num_repeated, #number_repeated, #table
Attributes inherited from ElementNode
#doc, #element_name, #namespace
Instance Method Summary collapse
-
#has_styles?(column_style, default_cell_style) ⇒ Boolean
rubocop:disable Naming/PredicateName.
-
#initialize(column_style, default_cell_style, number_repeated = 1, table:) ⇒ TableColumn
constructor
Initializes a new column.
Methods inherited from Repeatable
Methods inherited from ElementNode
#add_child, #attributes, #children, #clear_attribute, #create_element, #element, #ensure_element!, #prefix, #prefixed_attr_name, #set_attribute
Constructor Details
#initialize(column_style, default_cell_style, number_repeated = 1, table:) ⇒ TableColumn
Initializes a new column
18 19 20 21 22 23 24 |
# 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 |
Instance Attribute Details
#column_style ⇒ Object (readonly)
Returns the value of attribute column_style.
11 12 13 |
# File 'lib/berkeley_library/util/ods/xml/table/table_column.rb', line 11 def column_style @column_style end |
#default_cell_style ⇒ Object (readonly)
Returns the value of attribute default_cell_style.
12 13 14 |
# File 'lib/berkeley_library/util/ods/xml/table/table_column.rb', line 12 def default_cell_style @default_cell_style end |
Instance Method Details
#has_styles?(column_style, default_cell_style) ⇒ Boolean
rubocop:disable Naming/PredicateName
27 28 29 |
# 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 |