Module: DataImp::ImportMethods
- Included in:
- DataImp
- Defined in:
- lib/data_imp/import_methods.rb
Instance Method Summary collapse
Instance Method Details
#import(file = nil, **args, &block) ⇒ Object
7 8 9 10 11 |
# File 'lib/data_imp/import_methods.rb', line 7 def import(file=nil, **args, &block) file.strip! return if file =~ /^#/ new(file, **args, &block).import end |
#import_list(list, **args, &block) ⇒ Object
13 14 15 16 17 |
# File 'lib/data_imp/import_methods.rb', line 13 def import_list(list, **args, &block) list.each_line do |file| import file, **args, &block end end |