Sha256: d11277aaa64be0a22666fbd46ca73d78b854667d96c051380863dc08d3c4841c

Contents?: true

Size: 370 Bytes

Versions: 3

Compression:

Stored size: 370 Bytes

Contents

module CrewCheck
  class RoleDetermination
    def initialize(team_list, role_map)
      @team_list = team_list
      @role_map = role_map
    end

    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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
omniauth-crew-check-0.0.4 lib/crew_check/role_determination.rb
omniauth-crew-check-0.0.3 lib/crew_check/role_determination.rb
omniauth-crew-check-0.0.2 lib/crew_check/role_determination.rb