Class: S3Secure::CLI::Base
- Inherits:
-
Object
- Object
- S3Secure::CLI::Base
- Extended by:
- Memoist
- Includes:
- AwsServices, Say
- Defined in:
- lib/s3_secure/cli/base.rb
Direct Known Subclasses
AccessLogs::Base, RemediateAll, Summary, Encryption::Base, Lifecycle::Base, Policy::Base, PublicAccess::Base, Summary::Items, Versioning::Base
Instance Method Summary collapse
- #buckets ⇒ Object
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
Methods included from Say
Methods included from AwsServices
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 = @bucket = [:bucket] # not set on the list command but common enough to set here end |
Instance Method Details
#buckets ⇒ Object
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 |