Class: Writexlsx::Package::Theme

Inherits:
Object
  • Object
show all
Defined in:
lib/write_xlsx/package/theme.rb

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Theme

Returns a new instance of Theme.



9
10
11
# File 'lib/write_xlsx/package/theme.rb', line 9

def initialize
  @writer = nil
end

Instance Method Details

#assemble_xml_file ⇒ Object



13
14
15
16
17
18
19
# File 'lib/write_xlsx/package/theme.rb', line 13

def assemble_xml_file
  return unless @writer

  write_theme_file
  @writer.write("\n")
  @writer.close
end

#set_xml_writer(filename) ⇒ Object

Set the filehandle only. This class doesn't use a real XML writer class.



24
25
26
27
28
# File 'lib/write_xlsx/package/theme.rb', line 24

def set_xml_writer(filename)
  fh = open(filename, 'wb')

  @writer = fh
end