class Deputy53::Identity

Unified class for Users, Groups, and Roles.

Public Class Methods

new(identity) click to toggle source
# File lib/deputy53/identity.rb, line 7
def initialize(identity)
  @identity = identity
  self
end

Public Instance Methods

id() click to toggle source
# File lib/deputy53/identity.rb, line 23
def id
  @id ||= @identity.method("#{type}_id").call
end
name() click to toggle source
# File lib/deputy53/identity.rb, line 18
def name
  @name ||= @identity.method("#{type}_name").call
end
type() click to toggle source
# File lib/deputy53/identity.rb, line 13
def type
  @type ||= @identity.arn.split(':').last.split('/').first.to_sym
end