Class: BerkeleyLibrary::Util::ODS::XML::Style::ColumnStyle
- Inherits:
-
Style
- Object
- ElementNode
- Style
- BerkeleyLibrary::Util::ODS::XML::Style::ColumnStyle
- Defined in:
- lib/berkeley_library/util/ods/xml/style/column_style.rb
Constant Summary collapse
- DEFAULT_WIDTH =
'1in'.freeze
Instance Attribute Summary collapse
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Attributes inherited from Style
Attributes inherited from ElementNode
#doc, #element_name, #namespace
Instance Method Summary collapse
-
#initialize(style_name, width = nil, styles:) ⇒ ColumnStyle
constructor
Initializes a new column style.
Methods inherited from Style
Methods inherited from ElementNode
#add_child, #attributes, #children, #clear_attribute, #create_element, #element, #ensure_element!, #prefix, #prefixed_attr_name, #set_attribute
Constructor Details
#initialize(style_name, width = nil, styles:) ⇒ ColumnStyle
Initializes a new column style. Note that this should not be called directly, but only from Office::AutomaticStyles#add_column_style.
20 21 22 23 24 |
# File 'lib/berkeley_library/util/ods/xml/style/column_style.rb', line 20 def initialize(style_name, width = nil, styles:) super(style_name, :table_column, doc: styles.doc) @width = width || DEFAULT_WIDTH add_default_children! end |
Instance Attribute Details
#width ⇒ Object (readonly)
Returns the value of attribute width.
12 13 14 |
# File 'lib/berkeley_library/util/ods/xml/style/column_style.rb', line 12 def width @width end |