Class: We::GitHubStats::Organization

Inherits:
Object
  • Object
show all
Defined in:
lib/we/github_stats/organization.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:, name:) ⇒ Organization

Returns a new instance of Organization.



4
5
6
7
# File 'lib/we/github_stats/organization.rb', line 4

def initialize(client:, name:)
  @client = client
  @name = name
end

Instance Method Details

#reposObject



9
10
11
12
13
14
15
# File 'lib/we/github_stats/organization.rb', line 9

def repos
  @repos ||= begin
    client.org_repos(name).compact.reject(&:fork).map do |repo|
      Repository.new(client: client, name: repo.name, full_name: repo.full_name)
    end
  end
end