Method: ExcelValidator::ValidateFile#content_of_cell_is?

Defined in:
lib/excel_validator.rb

#content_of_cell_is?(sheet_number, row, column, content, case_sensitive = false) ⇒ Boolean

checks if the content at the specified row and column is as required

Returns:

  • (Boolean)


58
59
60
61
# File 'lib/excel_validator.rb', line 58

def content_of_cell_is?(sheet_number, row, column, content, case_sensitive=false)  
  set_default_sheet(sheet_number)
  return ( (case_sensitive) ? (@file.cell(row,column).to_s == content.to_s) : (@file.cell(row,column).to_s.downcase == content.to_s.downcase))
end