Sha256: 1943138d4bca12cad02fed1bb294269151f05a9855482e635009bcfaeaea6d0b

Contents?: true

Size: 693 Bytes

Versions: 3

Compression:

Stored size: 693 Bytes

Contents

module RubyXL
  module LegacyCell
    def workbook
      @worksheet.workbook
    end

    private

    def validate_workbook
      unless workbook.nil? || workbook.worksheets.nil?
        workbook.worksheets.each { |sheet|
          unless sheet.nil? || sheet.sheet_data.nil? || sheet.sheet_data[row].nil?
            if sheet.sheet_data[row][column] == self
              return
            end
          end
        }
      end
      raise "This cell #{self} is not in workbook #{workbook}"
    end

    def validate_worksheet
      return if @worksheet && @worksheet[row] && @worksheet[row][column].equal?(self)
      raise "Cell #{self} is not in worksheet #{worksheet}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubyXL-3.4.27 lib/rubyXL/cell.rb
rubyXL-3.4.26 lib/rubyXL/cell.rb
rubyXL-3.4.25 lib/rubyXL/cell.rb