lib/githu3/team.rb in githu3-0.0.2 vs lib/githu3/team.rb in githu3-0.0.3
- old
+ new
@@ -4,10 +4,14 @@
has_many :members, :class_name => :user
has_many :repos
def member?(user_login)
- _client.conn.get("/teams/#{id}/members/#{user_login}").status == 204
+ begin
+ _client.conn.get("/teams/#{id}/members/#{user_login}").status == 204
+ rescue Githu3::NotFound
+ false
+ end
end
end
end