Sha256: 669367f63182c02fa68f3a29abd379344122396baaf1467520d01659b1eb7bb3
Contents?: true
Size: 742 Bytes
Versions: 8
Compression:
Stored size: 742 Bytes
Contents
# frozen_string_literal: true require "roo/helpers/weak_instance_cache" module Roo class Excelx class Extractor include Roo::Helpers::WeakInstanceCache COMMON_STRINGS = { t: "t", r: "r", s: "s", ref: "ref", html_tag_open: "<html>", html_tag_closed: "</html>" } def initialize(path, options = {}) @path = path @options = options end private def doc instance_cache(:@doc) do raise FileNotFound, "#{@path} file not found" unless doc_exists? ::Roo::Utils.load_xml(@path).remove_namespaces! end end def doc_exists? @path && File.exist?(@path) end end end end
Version data entries
8 entries across 8 versions & 2 rubygems