Class: Inventory::Iam::User
- Includes:
- Shared
- Defined in:
- lib/inventory/iam/user.rb
Instance Method Summary collapse
Methods included from Shared
#all_users, #group_names, #groupless_users, #groups, #groups_for, #user_count, #user_names, #users, #users_in_group
Methods inherited from Base
eager_load!, inherited, #initialize, #report, #show, subclasses, #test_mode
Methods included from AwsServices
#acm, #cfn, #cw, #eb, #ec2, #ecs, #elbv1, #elbv2, #iam, #pricing, #rds, #route53
Methods included from Shared
Constructor Details
This class inherits a constructor from Inventory::Base
Instance Method Details
#data ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/inventory/iam/user.rb', line 9 def data users.map do |user| group_names = group_names(user).join(',') [user.user_name, group_names] end end |
#header ⇒ Object
5 6 7 |
# File 'lib/inventory/iam/user.rb', line 5 def header ["User", "Password Last Used"] end |
#sort(data) ⇒ Object
17 18 19 |
# File 'lib/inventory/iam/user.rb', line 17 def sort(data) data.sort_by { |item| item[1].to_i }.reverse end |