Class: CrewCheck::RoleDetermination
- Inherits:
-
Object
- Object
- CrewCheck::RoleDetermination
- Defined in:
- lib/crew_check/role_determination.rb
Instance Method Summary collapse
-
#initialize(team_list, role_map) ⇒ RoleDetermination
constructor
A new instance of RoleDetermination.
- #roles ⇒ Object
Constructor Details
#initialize(team_list, role_map) ⇒ RoleDetermination
Returns a new instance of RoleDetermination.
3 4 5 6 |
# File 'lib/crew_check/role_determination.rb', line 3 def initialize(team_list, role_map) @team_list = team_list @role_map = role_map end |
Instance Method Details
#roles ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/crew_check/role_determination.rb', line 8 def roles unless @roles @roles = [] @role_map.each do |role, team_list| @roles << role.downcase if !(team_list & @team_list).empty? end end @roles end |