class Docxer::Word::Themes

Attributes

counter[RW]
themes[RW]

Public Class Methods

new() click to toggle source
# File lib/docxer/word/themes.rb, line 8
def initialize
  @themes = []
  @counter = 0
  
  add(Theme.new)
end

Public Instance Methods

add(theme) click to toggle source
# File lib/docxer/word/themes.rb, line 15
def add(theme)
  @counter += 1
  @themes << theme.set_sequence(@counter)
  theme
end
render(zip) click to toggle source
# File lib/docxer/word/themes.rb, line 21
def render(zip)
  @themes.each do |theme|
    zip.put_next_entry("word/theme/theme#{theme.sequence}.xml")
    zip.write(theme.render)
  end
end