Sha256: f312fe595b319dd781ff2920360173bf954b11b8283d4d8a7df16520f5aae390

Contents?: true

Size: 472 Bytes

Versions: 1

Compression:

Stored size: 472 Bytes

Contents

require 'githu3/repo'

module Githu3
  class Org < Githu3::Resource
    
    has_many :repos
    has_many :teams
    has_many :members, :class_name => :user
    has_many :public_members, :class_name => :user
    
    def member?(user_login)
      _client.conn.get("/orgs/#{login}/members/#{user_login}").status == 204
    end
    
    def public_member?(user_login)
      _client.conn.get("/orgs/#{login}/public_members/#{user_login}").status == 204
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
githu3-0.0.2 lib/githu3/org.rb