Class: Docxi::Word::Themes
- Inherits:
-
Object
- Object
- Docxi::Word::Themes
- Defined in:
- lib/docxi/word/themes.rb,
lib/docxi/word/themes/theme.rb
Defined Under Namespace
Classes: Theme
Instance Attribute Summary collapse
-
#counter ⇒ Object
Returns the value of attribute counter.
-
#themes ⇒ Object
Returns the value of attribute themes.
Instance Method Summary collapse
- #add(theme) ⇒ Object
-
#initialize ⇒ Themes
constructor
A new instance of Themes.
- #render(zip) ⇒ Object
Constructor Details
Instance Attribute Details
#counter ⇒ Object
Returns the value of attribute counter.
7 8 9 |
# File 'lib/docxi/word/themes.rb', line 7 def counter @counter end |
#themes ⇒ Object
Returns the value of attribute themes.
7 8 9 |
# File 'lib/docxi/word/themes.rb', line 7 def themes @themes end |
Instance Method Details
#add(theme) ⇒ Object
15 16 17 18 19 |
# File 'lib/docxi/word/themes.rb', line 15 def add(theme) @counter += 1 @themes << theme.set_sequence(@counter) theme end |
#render(zip) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/docxi/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 |