Class: Entitlements::Backend::GitHubTeam::Models::Team
- Inherits:
-
Models::Group
- Object
- Models::Group
- Entitlements::Backend::GitHubTeam::Models::Team
- Includes:
- Contracts::Core
- Defined in:
- lib/entitlements/backend/github_team/models/team.rb
Constant Summary collapse
- C =
::Contracts
Instance Attribute Summary collapse
-
#team_dn ⇒ Object
readonly
Returns the value of attribute team_dn.
-
#team_id ⇒ Object
readonly
Returns the value of attribute team_id.
-
#team_name ⇒ Object
readonly
Returns the value of attribute team_name.
Instance Method Summary collapse
-
#initialize(team_id:, team_name:, members:, ou:, metadata:) ⇒ Team
constructor
A new instance of Team.
Constructor Details
#initialize(team_id:, team_name:, members:, ou:, metadata:) ⇒ Team
Returns a new instance of Team.
26 27 28 29 30 31 |
# File 'lib/entitlements/backend/github_team/models/team.rb', line 26 def initialize(team_id:, team_name:, members:, ou:, metadata:) @team_id = team_id @team_name = team_name.downcase @team_dn = ["cn=#{team_name.downcase}", ou].join(",") super(dn: @team_dn, members: Set.new(members.map { |m| m.downcase }), metadata:) end |
Instance Attribute Details
#team_dn ⇒ Object (readonly)
Returns the value of attribute team_dn.
11 12 13 |
# File 'lib/entitlements/backend/github_team/models/team.rb', line 11 def team_dn @team_dn end |
#team_id ⇒ Object (readonly)
Returns the value of attribute team_id.
11 12 13 |
# File 'lib/entitlements/backend/github_team/models/team.rb', line 11 def team_id @team_id end |
#team_name ⇒ Object (readonly)
Returns the value of attribute team_name.
11 12 13 |
# File 'lib/entitlements/backend/github_team/models/team.rb', line 11 def team_name @team_name end |