Sha256: 4e18331143889b66806067dacf0c643ef8742b17b764bc166408a0202330c460
Contents?: true
Size: 826 Bytes
Versions: 10
Compression:
Stored size: 826 Bytes
Contents
module Axlsx # A simple, self serializing class for storing tables class Tables < SimpleTypedList # creates a new Tables object def initialize(worksheet) raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet) super Table @worksheet = worksheet end # The worksheet that owns this collection of tables # @return [Worksheet] attr_reader :worksheet # returns the relationships required by this collection def relationships return [] if empty? map{ |table| Relationship.new(TABLE_R, "../#{table.pn}") } end def to_xml_string(str = "") return if empty? str << "<tableParts count='#{size}'>" @list.each { |table| str << "<tablePart r:id='#{table.rId}'/>" } str << '</tableParts>' end end end
Version data entries
10 entries across 10 versions & 1 rubygems