Class: S3Secure::CLI::Batch
- Inherits:
-
Object
- Object
- S3Secure::CLI::Batch
- Extended by:
- Memoist
- Defined in:
- lib/s3_secure/cli/batch.rb
Instance Method Summary collapse
- #buckets ⇒ Object
-
#initialize(*params) ⇒ Batch
constructor
A new instance of Batch.
- #run ⇒ Object
Constructor Details
#initialize(*params) ⇒ Batch
Returns a new instance of Batch.
5 6 7 8 |
# File 'lib/s3_secure/cli/batch.rb', line 5 def initialize(*params) @params = params @command, @subcommand, @file = params end |
Instance Method Details
#buckets ⇒ Object
20 21 22 |
# File 'lib/s3_secure/cli/batch.rb', line 20 def buckets IO.readlines(@file).map(&:strip).reject(&:empty?) end |
#run ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/s3_secure/cli/batch.rb', line 10 def run buckets.each do |bucket| args = @params args.pop args << bucket puts "Running: s3-secure #{args.join(' ')}".color(:green) S3Secure::CLI.start(args) end end |