Class: CodeReviewLeaderboard::Organization

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:) ⇒ Organization

Returns a new instance of Organization.



13
14
15
# File 'lib/code_review_leaderboard/organization.rb', line 13

def initialize(name:)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/code_review_leaderboard/organization.rb', line 11

def name
  @name
end

Instance Method Details

#repos(since: 30.days.ago) ⇒ Object



17
18
19
# File 'lib/code_review_leaderboard/organization.rb', line 17

def repos(since: 30.days.ago)
  fetch_repos(since:).map { Repository.new(name: _1.full_name) }
end