Class: Oxcelix::Sharedstrings

Inherits:
Ox::Sax
  • Object
show all
Defined in:
lib/oxcelix/sax/sharedstrings.rb

Overview

Ox based SAX parser which pushes shared strings (taken from the sharedString.xml file) to an array These strings will replace the references in the cells (interpolation).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSharedstrings

Returns a new instance of Sharedstrings.


8
9
10
# File 'lib/oxcelix/sax/sharedstrings.rb', line 8

def initialize
  @stringarray = []
end

Instance Attribute Details

#stringarrayArray

Returns the array of all the strings found in sharedStrings.xml.

Returns:

  • (Array)

    the array of all the strings found in sharedStrings.xml


7
8
9
# File 'lib/oxcelix/sax/sharedstrings.rb', line 7

def stringarray
  @stringarray
end

Instance Method Details

#text(str) ⇒ Object

Push the comment string into @stringarray


13
14
15
# File 'lib/oxcelix/sax/sharedstrings.rb', line 13

def text(str)
  @stringarray << str
end