Class: Flubber::AwsFolderUpload

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

Constant Summary collapse

IGNORED_FILES =
[".DS_Store"]

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(folder_name, aws_destination) ⇒ AwsFolderUpload

Returns a new instance of AwsFolderUpload.



11
12
13
14
# File 'lib/aws_folder_upload.rb', line 11

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

Class Method Details

.upload(folder_name:, aws_destination:) ⇒ Object



7
8
9
# File 'lib/aws_folder_upload.rb', line 7

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

Instance Method Details

#uploadObject



16
17
18
19
20
21
22
23
# File 'lib/aws_folder_upload.rb', line 16

def upload
  file_paths.each do |file_path|
    AwsFileUpload.upload(
      file_path: file_path,
      aws_destination: aws_destination,
    )
  end
end