Class: Nppes::UpdatePack::Base
- Inherits:
-
Object
- Object
- Nppes::UpdatePack::Base
- Defined in:
- lib/nppes/update_pack/base.rb
Instance Method Summary collapse
Instance Method Details
#parse(file) ⇒ Object
8 9 10 11 |
# File 'lib/nppes/update_pack/base.rb', line 8 def parse(file) raise Exception.new('Block required') unless block_given? file.each_with_index { |row, i| yield row unless i == 0 } end |
#split_row(row) ⇒ Object
13 14 15 |
# File 'lib/nppes/update_pack/base.rb', line 13 def split_row(row) row.gsub(/\A"|"\n?\z/, '').split(/\",\"/) end |