Class: Githu3::Org
Instance Method Summary
collapse
Methods inherited from Resource
#_attributes, #_path, #get, #id, #initialize, #method_missing
Methods included from Relations
#embeds_many, #embeds_one, #has_many
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Githu3::Resource
Instance Method Details
#member?(user_login) ⇒ Boolean
11
12
13
14
15
16
17
|
# File 'lib/githu3/org.rb', line 11
def member?(user_login)
begin
_client.conn.get("/orgs/#{login}/members/#{user_login}").status == 204
rescue Githu3::NotFound
false
end
end
|
#public_member?(user_login) ⇒ Boolean
19
20
21
22
23
24
25
|
# File 'lib/githu3/org.rb', line 19
def public_member?(user_login)
begin
_client.conn.get("/orgs/#{login}/public_members/#{user_login}").status == 204
rescue Githu3::NotFound
false
end
end
|