Class: Fakes::S3Service
- Inherits:
-
Object
- Object
- Fakes::S3Service
- Defined in:
- app/services/caseflow/fakes/s3_service.rb
Class Method Summary collapse
- .fetch_content(filename) ⇒ Object
- .fetch_file(filename, dest_filepath) ⇒ Object
- .store_file(filename, content, _type = :content) ⇒ Object
Class Method Details
.fetch_content(filename) ⇒ Object
17 18 19 20 |
# File 'app/services/caseflow/fakes/s3_service.rb', line 17 def self.fetch_content(filename) self.files ||= {} self.files[filename] end |
.fetch_file(filename, dest_filepath) ⇒ Object
10 11 12 13 14 15 |
# File 'app/services/caseflow/fakes/s3_service.rb', line 10 def self.fetch_file(filename, dest_filepath) self.files ||= {} File.open(dest_filepath, "wb") do |f| f.write(files[filename]) end end |
.store_file(filename, content, _type = :content) ⇒ Object
5 6 7 8 |
# File 'app/services/caseflow/fakes/s3_service.rb', line 5 def self.store_file(filename, content, _type = :content) self.files ||= {} self.files[filename] = content end |