Class: We::GitHubStats::Organization
- Inherits:
-
Object
- Object
- We::GitHubStats::Organization
- Defined in:
- lib/we/github_stats/organization.rb
Instance Method Summary collapse
-
#initialize(client:, name:) ⇒ Organization
constructor
A new instance of Organization.
- #repos ⇒ Object
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
#repos ⇒ Object
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 |