Class: RadCoreRails::ZipImporter
- Inherits:
-
Object
- Object
- RadCoreRails::ZipImporter
- Defined in:
- lib/rad_core_rails/zip_importer.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#zip_codes_data ⇒ Object
readonly
Returns the value of attribute zip_codes_data.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(file_path) ⇒ ZipImporter
constructor
A new instance of ZipImporter.
Constructor Details
#initialize(file_path) ⇒ ZipImporter
Returns a new instance of ZipImporter.
7 8 9 |
# File 'lib/rad_core_rails/zip_importer.rb', line 7 def initialize(file_path) @file_path = file_path end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
5 6 7 |
# File 'lib/rad_core_rails/zip_importer.rb', line 5 def file_path @file_path end |
#zip_codes_data ⇒ Object (readonly)
Returns the value of attribute zip_codes_data.
5 6 7 |
# File 'lib/rad_core_rails/zip_importer.rb', line 5 def zip_codes_data @zip_codes_data end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rad_core_rails/zip_importer.rb', line 11 def call puts "Parsing file..." parse_data puts "Parsing completed." puts "Importing data..." import_data! puts "Successfully imported!" true end |