Class: RedshiftConnector::S3DataFile

Inherits:
AbstractDataFile show all
Defined in:
lib/redshift_connector/s3_data_file.rb

Instance Method Summary collapse

Methods inherited from AbstractDataFile

#data_object?, #each_row, #gzipped_object?

Constructor Details

#initialize(object, reader_class:) ⇒ S3DataFile

Returns a new instance of S3DataFile.



5
6
7
8
# File 'lib/redshift_connector/s3_data_file.rb', line 5

def initialize(object, reader_class:)
  super reader_class: reader_class
  @object = object
end

Instance Method Details

#keyObject



10
11
12
# File 'lib/redshift_connector/s3_data_file.rb', line 10

def key
  @object.key
end

#openObject



14
15
16
# File 'lib/redshift_connector/s3_data_file.rb', line 14

def open
  @object.get.body
end