Class: 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
Methods inherited from BaseCmd
#has_options?, #has_prefix?, #usage
Constructor Details
#initialize ⇒ ListBuckets
Returns a new instance of ListBuckets.
77 78 79 80 81 |
# File 'lib/s3ranger/cli.rb', line 77 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
83 84 85 86 87 |
# File 'lib/s3ranger/cli.rb', line 83 def run s3, bucket, key, file, args s3.buckets.each do |bkt| puts "#{bkt.name}" end end |