Class: BerkeleyLibrary::Util::ODS::XML::Style::RowStyle

Inherits:
Style show all
Defined in:
lib/berkeley_library/util/ods/xml/style/row_style.rb

Constant Summary collapse

DEFAULT_HEIGHT =
'0.25in'.freeze

Instance Attribute Summary collapse

Attributes inherited from Style

#family, #style_name

Attributes inherited from ElementNode

#doc, #element_name, #namespace

Instance Method Summary collapse

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(name, height = nil, styles:) ⇒ RowStyle

Initializes a new cell style. Note that this should not be called directly, but only from Office::AutomaticStyles#add_row_style.

Parameters:

  • name (String)

    the name of the style

  • height (String) (defaults to: nil)

    the row height

  • styles (XML::Office::AutomaticStyles)

    the document styles



21
22
23
24
25
# File 'lib/berkeley_library/util/ods/xml/style/row_style.rb', line 21

def initialize(name, height = nil, styles:)
  super(name, :table_row, doc: styles.doc)
  @height = height || DEFAULT_HEIGHT
  add_default_children!
end

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height.



13
14
15
# File 'lib/berkeley_library/util/ods/xml/style/row_style.rb', line 13

def height
  @height
end