Sha256: f016e5383b7e513042e76124f0854fa00dfb8d52be1e4b097553053c29c13eff

Contents?: true

Size: 447 Bytes

Versions: 6

Compression:

Stored size: 447 Bytes

Contents

# FIXME: This is obviously bad programming. What if we multithread?!
module RubyFromExcel
  class SharedStrings < Array
    include Singleton
  
    def self.shared_string_for(index)
      self.instance.shared_string_for(index)
    end
  
    def load_strings_from_xml(xml)
      xml.css("si").each do |si|
        push si.css("t").map(&:content).join
      end
    end
  
    def shared_string_for(index)
      at(index.to_i)
    end
  
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubyfromexcel-0.0.10 lib/excelfile/shared_strings.rb
rubyfromexcel-0.0.9 lib/excelfile/shared_strings.rb
rubyfromexcel-0.0.7 lib/excelfile/shared_strings.rb
rubyfromexcel-0.0.6 lib/excelfile/shared_strings.rb
rubyfromexcel-0.0.5 lib/excelfile/shared_strings.rb
rubyfromexcel-0.0.4 lib/excelfile/shared_strings.rb