Class: Lsgh::Repository
- Inherits:
-
Object
- Object
- Lsgh::Repository
- Defined in:
- lib/lsgh/repository.rb
Instance Method Summary collapse
-
#initialize(repo, client) ⇒ Repository
constructor
A new instance of Repository.
- #to_paths ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(repo, client) ⇒ Repository
Returns a new instance of Repository.
3 4 5 6 |
# File 'lib/lsgh/repository.rb', line 3 def initialize(repo, client) @repo = repo @pull_requests = client.pull_requests.all(user: repo['owner']['login'], repo: repo['name']) end |
Instance Method Details
#to_paths ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/lsgh/repository.rb', line 8 def to_paths paths = [name] paths += pull_requests_paths.map do |path| "#{name}/#{path}" end paths end |
#type ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/lsgh/repository.rb', line 17 def type if @repo['private'] :private else :public end end |