Class: Alexandria::CSVImport
- Inherits:
-
Object
- Object
- Alexandria::CSVImport
show all
- Defined in:
- lib/alexandria/import_library_csv.rb
Instance Method Summary
collapse
Constructor Details
#initialize(header) ⇒ CSVImport
Returns a new instance of CSVImport.
30
31
32
33
|
# File 'lib/alexandria/import_library_csv.rb', line 30
def initialize()
@header =
@html = HTMLEntities.new
end
|
Instance Method Details
#index_of(header_name) ⇒ Object
35
36
37
38
39
40
|
# File 'lib/alexandria/import_library_csv.rb', line 35
def index_of()
@header.each_with_index do |h, i|
return i if h ==
end
-1
end
|
#normalize(string) ⇒ Object
42
43
44
|
# File 'lib/alexandria/import_library_csv.rb', line 42
def normalize(string)
@html.decode(string).strip
end
|