Class: AwsRotate::List
- Inherits:
-
Base
- Object
- Base
- AwsRotate::List
show all
- Defined in:
- lib/aws_rotate/list.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
#iam, #sts
Instance Method Details
#profiles ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/aws_rotate/list.rb', line 8
def profiles
lines = IO.readlines(@credentials_path)
profiles = []
lines.each do |line|
next if line =~ /^\s*#/
md = line.match(/\[(.*)\]/)
profiles << md[1] if md
end
profiles
end
|
#run ⇒ Object
3
4
5
6
|
# File 'lib/aws_rotate/list.rb', line 3
def run
puts "AWS Profiles:"
puts profiles
end
|