Class: S3Secure::AbstractBase

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Includes:
AwsServices
Defined in:
lib/s3_secure/abstract_base.rb

Instance Method Summary collapse

Methods included from S3Secure::AwsServices::S3

#check_bucket!, #new_s3_regional_client, #region, #region_map, #s3, #s3_client

Constructor Details

#initialize(options = {}) ⇒ AbstractBase

Returns a new instance of AbstractBase.



6
7
8
9
# File 'lib/s3_secure/abstract_base.rb', line 6

def initialize(options={})
  @options = options
  @bucket = options[:bucket] # not set on the list command but common enough to set here
end

Instance Method Details

#bucketsObject



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

def buckets
  resp = s3_client.list_buckets
  resp.buckets.map(&:name)
end