Class: S3Ranger::CLI::ListBuckets

Inherits:
CmdParse::Command
  • Object
show all
Defined in:
lib/s3ranger/cli.rb

Instance Method Summary collapse

Constructor Details

#initializeListBuckets



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