vendor/cache/ruby/2.3.0/gems/warden-github-rails-1.3.0/lib/warden/github/rails/config.rb
# Gets the team id for a team id or alias.
Gets the team id for a team id or alias.
Gets the team id for a team id or alias .
def team_id(team)
          if team.is_a? Symbol
            teams.fetch(team)
          else
            Integer(team)  rescue teams.fetch(team.to_sym)
          end
        rescue IndexError
          fail BadConfig, "No team id defined for team #{team}."
        end
def team_id ( team ) if team . is_a? Symbol teams . fetch ( team ) else Integer ( team ) rescue teams . fetch ( team . to_sym ) end rescue IndexError fail BadConfig , "No team id defined for team #{team}." end
Gets the team id for a team id or alias.
Gets the team id for a team id or alias .
# In ruby 1.8 doing a Integer(:symbol) returns an integer. Thus, test # for symbol first.
team
<not_specific>