Class: S3Secure::AbstractBase

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

Instance Method Summary collapse

Methods included from Say

#say

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.



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

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



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

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