Class: Awsclean::AwsCommand
- Inherits:
-
Object
- Object
- Awsclean::AwsCommand
- Defined in:
- lib/awsclean/aws_command.rb
Class Method Summary collapse
Class Method Details
.filter_regions(regions) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/awsclean/aws_command.rb', line 15 def filter_regions(regions) supported = supported_regions if regions.first == "all" supported_regions else # TODO: throw something if region not available regions.select { |r| supported.include? r } end end |
.supported_regions ⇒ Object
9 10 11 12 13 |
# File 'lib/awsclean/aws_command.rb', line 9 def supported_regions Aws.partition('aws').regions .select { |region| region.services.include?(self.const_get(:SERVICE_IDENTIFIER)) } .map(&:name) end |