class Validator::ExcelAttribValidator
Excel file attributes and properties validator¶ ↑
Public Class Methods
new(path, sht)
click to toggle source
Calls superclass method
Connector::ExcelReadConnector::new
# File lib/mylookup/validator.rb, line 10 def initialize(path, sht) super(path) @sht = sht end
Public Instance Methods
validate_column(col_name)
click to toggle source
# File lib/mylookup/validator.rb, line 23 def validate_column col_name if column_exists? @sht, col_name [true, "#{col_name} column in #{@sht} sheet of #{@path} exists"] else [false, "#{col_name} column in #{@sht} sheet of #{@path} DOES NOT exist!"] end end
validate_sheet()
click to toggle source
# File lib/mylookup/validator.rb, line 15 def validate_sheet if sheet_exists? @sht [true, "#{@sht} sheet in #{@path} exists"] else [false, "#{@sht} sheet in #{@path} DOES NOT exist!"] end end