lib/octokit/client/organizations.rb
def organization_member?(org, user, options = {})
        result = boolean_from_response(:get, "#{Organization.path org}/members/#{user}", options)
        if !result && last_response && last_response.status == 302
          boolean_from_response :get, last_response.headers['Location']
        else
          result
        end
      end
# Check if a user is a member of an organization.
#
# Use this to check if another user is a member of an organization that
# you are a member. If you are not in the organization you are checking,
# use .organization_public_member? instead.
#
# @param org [String, Integer] Organization GitHub login or id.
# @param user [String] GitHub username of the user to check.
#
# @return [Boolean] Is a member?
#
# @see https://developer.github.com/v3/orgs/members/#check-membership
#
# @example Check if a user is in your organization
#   @client.organization_member?('your_organization', 'pengwynn')
#   => false
Check if a user is a member of an organization.
Use this to check if another user is a member of an organization that
you are a member. If you are not in the organization you are checking,
use .organization_public_member. instead.
Check if a user is a member of an organization . Use this to check if another user is a member of an organization that you are a member . If you are not in the organization you are checking use . organization_public_member . instead .
def organization_member?(org, user, options = {})
        result = boolean_from_response(:get, "#{Organization.path org}/members/#{user}", options)
        if !result && last_response && last_response.status == 302
          boolean_from_response :get, last_response.headers['Location']
        else
          result
        end
      end
def organization_member? ( org , user , options = { } ) result = boolean_from_response ( :get , "#{Organization.path org}/members/#{user}" , options ) if ! result && last_response && last_response . status == 302 boolean_from_response :get , last_response . headers [ 'Location' ] else result end end
Check if a user is a member of an organization.
Check if a user is a member of an organization .
None
Boolean
org
Organization GitHub login or id.
Organization GitHub login or id .
user
GitHub username of the user to check.
GitHub username of the user to check .
options
see
None
example
Check if a user is in your organization @client.organization_member?('your_organization', 'pengwynn') => false
Check if a user is in your organization @client . organization_member? ( ' your_organization ' ' pengwynn ' ) = > false