class OpenXml::Docx::Parts::Fonts
Attributes
fonts[R]
relationships[R]
Public Class Methods
new()
click to toggle source
# File lib/openxml/docx/parts/fonts.rb, line 11 def initialize @fonts = [] @relationships = OpenXml::Parts::Rels.new end
Public Instance Methods
<<(font)
click to toggle source
# File lib/openxml/docx/parts/fonts.rb, line 16 def <<(font) @fonts << font end
count()
click to toggle source
# File lib/openxml/docx/parts/fonts.rb, line 20 def count fonts.count end
to_xml()
click to toggle source
# File lib/openxml/docx/parts/fonts.rb, line 24 def to_xml build_standalone_xml do |xml| xml.fonts(root_namespaces) { xml.parent.namespace = :w fonts.each { |font| font.to_xml(xml) } } end end