class Connector::ExcelReadConnector

Public Class Methods

new(path) click to toggle source
# File lib/mylookup/connector.rb, line 38
def initialize(path)
    @path = path
    @wb = Roo::Excelx.new(@path) 
    @sheets = @wb.sheets
end

Public Instance Methods

column_exists?(sht, col_name) click to toggle source
# File lib/mylookup/connector.rb, line 48
def column_exists? sht, col_name 
    @wb.sheet(sht).row(1).include? col_name
end
sheet_exists?(sht_name) click to toggle source
# File lib/mylookup/connector.rb, line 44
def sheet_exists? sht_name
    @sheets.include? sht_name
end