Sha256: f543f13f52f00395b29143a5c50eacca9da8a418e88e6399cf41fd768a7cf6fa
Contents?: true
Size: 989 Bytes
Versions: 27
Compression:
Stored size: 989 Bytes
Contents
require 'uri' module Aws module S3 class Bucket # Deletes all objects and versioned objects from this bucket # # @example # # bucket.clear! # # @return [void] def clear! object_versions.delete end # Deletes all objects and versioned objects from this bucket and # then deletes the bucket. # # @example # # bucket.delete! # # @return [void] def delete! clear! delete end # @return [String] the URL for this bucket. def url url = URI.parse(client.config.endpoint.to_s) if dns_compatible?(url.scheme) && !client.config.force_path_style url.host = "#{name}.#{url.host}" else url.path = "/#{name}" end url.to_s end private def dns_compatible?(scheme) Plugins::S3BucketDns.dns_compatible?(name, scheme == 'https') end end end end
Version data entries
27 entries across 27 versions & 1 rubygems