Class: CrewCheck::RoleDetermination

Inherits:
Object
  • Object
show all
Defined in:
lib/crew_check/role_determination.rb

Instance Method Summary collapse

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

#rolesObject



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