Class: JunglePath::DBAccess::Import::Delete
- Inherits:
-
Object
- Object
- JunglePath::DBAccess::Import::Delete
- Defined in:
- lib/jungle_path/db_access/import/delete.rb
Instance Method Summary collapse
- #_models(model, force = false) ⇒ Object
-
#initialize(config, logger = nil) ⇒ Delete
constructor
A new instance of Delete.
Constructor Details
#initialize(config, logger = nil) ⇒ Delete
Returns a new instance of Delete.
9 10 11 12 13 |
# File 'lib/jungle_path/db_access/import/delete.rb', line 9 def initialize(config, logger=nil) @logger = logger @path = config.import_file_path #@db = JunglePath::DBAccess::IO::DB.new(config, @logger) end |
Instance Method Details
#_models(model, force = false) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/jungle_path/db_access/import/delete.rb', line 15 def _models(model, force=false) if force file_name = JunglePath::DBAccess::Import.data_file_name(@path, model.class.table_name) File.delete file_name if File.exist?(file_name) #if @db # @db.delete._models(model, force) #end end end |