Class: Tortoise::Loader
- Inherits:
-
Object
- Object
- Tortoise::Loader
- Defined in:
- lib/tortoise/services/loader.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file) ⇒ Loader
constructor
A new instance of Loader.
- #load ⇒ Object
Constructor Details
#initialize(file) ⇒ Loader
Returns a new instance of Loader.
5 6 7 |
# File 'lib/tortoise/services/loader.rb', line 5 def initialize(file) @file = file end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
3 4 5 |
# File 'lib/tortoise/services/loader.rb', line 3 def file @file end |
Class Method Details
.load(file) ⇒ Object
9 10 11 |
# File 'lib/tortoise/services/loader.rb', line 9 def self.load(file) new(file).load end |
Instance Method Details
#load ⇒ Object
13 14 15 16 17 |
# File 'lib/tortoise/services/loader.rb', line 13 def load return if exists? Tortoise::UploadJob.new(invoice.id).perform_now end |