Sha256: 7adb45ca694734d0b5a471a22756cfb9677cb6a281170d3334b427b399087b36
Contents?: true
Size: 1.05 KB
Versions: 10
Compression:
Stored size: 1.05 KB
Contents
require 'berkeley_library/util/ods/xml/element_node' require 'berkeley_library/util/ods/xml/office/font_face_decls' require 'berkeley_library/util/ods/xml/office/styles' module BerkeleyLibrary module Util module ODS module XML module Office class DocumentStyles < XML::ElementNode REQUIRED_NAMESPACES = %i[office style fo].freeze def initialize(doc:) super(:office, 'document-styles', doc: doc) set_default_attributes! add_default_children! end private def required_namespaces @required_namespaces ||= REQUIRED_NAMESPACES.map { |p| Namespace.for_prefix(p) } end def set_default_attributes! required_namespaces.each { |ns| set_attribute(:xmlns, ns.prefix, ns.uri) } end def add_default_children! add_child(FontFaceDecls.new(doc: doc)) add_child(Styles.new(doc: doc)) end end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems