Class: CsvService
- Inherits:
-
Object
- Object
- CsvService
- Defined in:
- lib/csv_service.rb
Instance Attribute Summary collapse
-
#service_impl ⇒ Object
readonly
Returns the value of attribute service_impl.
Instance Method Summary collapse
- #clear_tmp_file ⇒ Object
-
#initialize(result_id) ⇒ CsvService
constructor
A new instance of CsvService.
Constructor Details
#initialize(result_id) ⇒ CsvService
5 6 7 8 9 10 11 |
# File 'lib/csv_service.rb', line 5 def initialize(result_id) if APP_CONFIG['s3_bucket'] @service_impl = CsvHelper::Aws.new(result_id) else @service_impl = CsvHelper::Local.new(result_id) end end |
Instance Attribute Details
#service_impl ⇒ Object (readonly)
Returns the value of attribute service_impl.
2 3 4 |
# File 'lib/csv_service.rb', line 2 def service_impl @service_impl end |
Instance Method Details
#clear_tmp_file ⇒ Object
13 14 15 |
# File 'lib/csv_service.rb', line 13 def clear_tmp_file File.delete(filepath) if File.exist?(filepath) end |