Class: Flubber::AwsFileUpload

Inherits:
Object
  • Object
show all
Defined in:
lib/aws_file_upload.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path, aws_destination) ⇒ AwsFileUpload

Returns a new instance of AwsFileUpload.



14
15
16
17
# File 'lib/aws_file_upload.rb', line 14

def initialize(file_path, aws_destination)
  @file_path = file_path
  @aws_destination = aws_destination
end

Class Method Details

.upload(file_path:, aws_destination:) ⇒ Object



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

def self.upload(file_path:, aws_destination:)
  new(file_path, aws_destination).upload
end

Instance Method Details

#uploadObject



19
20
21
# File 'lib/aws_file_upload.rb', line 19

def upload
  connection.post("/", payload)
end