Sha256: 9077040b44b1e1e8be1ab3b31bceb1609d6d27cec83b04032bab74d693356f8e

Contents?: true

Size: 666 Bytes

Versions: 8

Compression:

Stored size: 666 Bytes

Contents

require 'rubyXL'

module BerkeleyLibrary
  module Util
    module XLSX
      module RubyXLCellExtensions
        # Workaround for https://github.com/weshatheleopard/rubyXL/issues/441
        def initialize(params = nil)
          super

          return unless params.respond_to?(:[])

          @worksheet ||= params[:worksheet]
          self.row ||= params[:row] # NOTE: not an instance variable
        end

        def blank?
          return true if value.nil?

          value.respond_to?(:strip) && value.strip.empty?
        end
      end
    end
  end
end

module RubyXL
  class Cell
    prepend BerkeleyLibrary::Util::XLSX::RubyXLCellExtensions
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
berkeley_library-location-4.1.0 lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb
berkeley_library-location-4.0.0 lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb
berkeley_library-location-3.0.0 lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb
berkeley_library-location-2.0.0 lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb
berkeley_library-holdings-1.0.5 lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb
berkeley_library-holdings-1.0.4 lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb
berkeley_library-holdings-1.0.3 lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb
berkeley_library-holdings-1.0.2 lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb