class AssetsDeployer::StorageBuilder

Public Class Methods

new(name:, credentials:, options:) click to toggle source
# File lib/assets_deployer/storage_builder.rb, line 9
def initialize(name:, credentials:, options:)
  @name = name
  @credentials = credentials
  @options = options
end

Public Instance Methods

build() click to toggle source
# File lib/assets_deployer/storage_builder.rb, line 15
def build
  case @name
  when 'S3'
    Storage::AwsS3.new(
      credentials: @credentials,
      bucket: @options[:bucket],
      prefix_key: @options[:prefix_key],
      region: @options[:region]
    )
  else
    raise InvalidStorageError
  end
end