Class: S3Secure::CLI::Base

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

Instance Method Summary collapse

Methods included from Say

#say

Methods included from AwsServices

#sts

Methods included from AwsServices::S3

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

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



7
8
9
10
# File 'lib/s3_secure/cli/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/cli/base.rb', line 12

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