Class: OmniAuth::Strategies::GitHubTeamMember
- Inherits:
-
GitHub
- Object
- GitHub
- OmniAuth::Strategies::GitHubTeamMember
- Defined in:
- lib/omniauth/strategies/github_team_member.rb
Instance Method Summary collapse
Instance Method Details
#booleanize_method_name(method_name) ⇒ Object
21 22 23 24 |
# File 'lib/omniauth/strategies/github_team_member.rb', line 21 def booleanize_method_name(method_name) return method_name if method_name =~ /\?$/ return "#{method_name}?" end |
#team_member?(team_id) ⇒ Boolean
14 15 16 17 18 19 |
# File 'lib/omniauth/strategies/github_team_member.rb', line 14 def team_member?(team_id) response = access_token.get("/teams/#{team_id}/members/#{raw_info['login']}") response.status == 204 rescue ::OAuth2::Error false end |