Class: S3Ranger::CLI::ListBuckets
- Inherits:
-
CmdParse::Command
- Object
- CmdParse::Command
- S3Ranger::CLI::ListBuckets
- Defined in:
- lib/s3ranger/cli.rb
Instance Method Summary collapse
-
#initialize ⇒ ListBuckets
constructor
A new instance of ListBuckets.
- #run(s3, bucket, key, file, args) ⇒ Object
Constructor Details
#initialize ⇒ ListBuckets
15 16 17 18 19 |
# File 'lib/s3ranger/cli.rb', line 15 def initialize super 'listbuckets', false, false, false @short_desc = "List all available buckets for your user" end |
Instance Method Details
#run(s3, bucket, key, file, args) ⇒ Object
21 22 23 24 25 |
# File 'lib/s3ranger/cli.rb', line 21 def run s3, bucket, key, file, args s3.buckets.each do |bkt| puts "#{bkt.name}" end end |