class BerkeleyLibrary::Util::ODS::XML::Office::Styles
Public Class Methods
new(doc:)
click to toggle source
Calls superclass method
BerkeleyLibrary::Util::ODS::XML::ElementNode::new
# File lib/berkeley_library/util/ods/xml/office/styles.rb, line 12 def initialize(doc:) super(:office, 'styles', doc: doc) add_default_children! end
Private Instance Methods
add_default_children!()
click to toggle source
# File lib/berkeley_library/util/ods/xml/office/styles.rb, line 20 def add_default_children! add_child(table_cell_default_style) add_child(Style::Style.new('Default', 'table-cell', doc: doc)) end
table_cell_default_style()
click to toggle source
# File lib/berkeley_library/util/ods/xml/office/styles.rb, line 25 def table_cell_default_style style_children = [ Style::ParagraphProperties.new(doc: doc), Style::TextProperties.new(font_name: Style::FontFace::DEFAULT_FONT_FACE, doc: doc) ] Style::DefaultStyle.new('table-cell', doc: doc).tap do |ds| style_children.each { |c| ds.add_child(c) } end end