Class: Tortoise::BulkLoader
- Inherits:
-
Object
- Object
- Tortoise::BulkLoader
- Defined in:
- lib/tortoise/services/bulk_loader.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(files) ⇒ BulkLoader
constructor
A new instance of BulkLoader.
- #load ⇒ Object
Constructor Details
#initialize(files) ⇒ BulkLoader
Returns a new instance of BulkLoader.
5 6 7 |
# File 'lib/tortoise/services/bulk_loader.rb', line 5 def initialize(files) @files = files end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
3 4 5 |
# File 'lib/tortoise/services/bulk_loader.rb', line 3 def files @files end |
Class Method Details
.load(files) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/tortoise/services/bulk_loader.rb', line 9 def self.load(files) new(files).load rescue StandardError => e puts "Um erro aconteceu!", e Honeybadger.notify(e, context: { files: files, configuration: Tortoise::Configuration.all.map(&:to_s), directories: Tortoise::Directory.all.map(&:to_s), version: Tortoise::VERSION }) unless ENV['TORTOISE_HONEYBADGER_API_KEY'].to_s.empty? end |