Class: Writexlsx::Package::RichValueRel

Inherits:
Object
  • Object
show all
Includes:
Utility::XmlPrimitives
Defined in:
lib/write_xlsx/package/rich_value_rel.rb

Overview

RichValueRel - A class for writing the Excel XLSX richValueRel.xml file.

Used in conjunction with Excel::Writer::XLSX

Copyright 2000-2024, John McNamara, [email protected]

Convert to Ruby by Hideo Nakamura, [email protected]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utility::XmlPrimitives

#r_id_attributes, #write_color, #write_xml_declaration, #xml_str

Constructor Details

#initializeRichValueRel

Returns a new instance of RichValueRel.



23
24
25
26
# File 'lib/write_xlsx/package/rich_value_rel.rb', line 23

def initialize
  @writer = Package::XMLWriterSimple.new
  @value_count = 0
end

Instance Attribute Details

#value_count=(value) ⇒ Object (writeonly)

Sets the attribute value_count

Parameters:

  • value

    the value to set the attribute value_count to.



21
22
23
# File 'lib/write_xlsx/package/rich_value_rel.rb', line 21

def value_count=(value)
  @value_count = value
end

Instance Method Details

#assemble_xml_fileObject



32
33
34
35
36
# File 'lib/write_xlsx/package/rich_value_rel.rb', line 32

def assemble_xml_file
  write_xml_declaration do
    write_rich_value_rels
  end
end

#set_xml_writer(filename) ⇒ Object



28
29
30
# File 'lib/write_xlsx/package/rich_value_rel.rb', line 28

def set_xml_writer(filename)
  @writer.set_xml_writer(filename)
end