class Alexandria::CSVImport

Public Class Methods

new(header) click to toggle source
# File lib/alexandria/import_library_csv.rb, line 30
def initialize(header)
  @header = header
  @html = HTMLEntities.new
end

Public Instance Methods

index_of(header_name) click to toggle source
# File lib/alexandria/import_library_csv.rb, line 35
def index_of(header_name)
  @header.each_with_index do |h, i|
    return i if h == header_name
  end
  -1
end
normalize(string) click to toggle source
# File lib/alexandria/import_library_csv.rb, line 42
def normalize(string)
  @html.decode(string).strip
end