Class: Gitload::Sources::GitHub::Repo

Inherits:
Repo
  • Object
show all
Defined in:
lib/gitload/sources/github.rb

Instance Attribute Summary

Attributes inherited from Repo

#api_data, #clone_urls, #cloned, #fork, #name, #owner, #owner_type, #source

Instance Method Summary collapse

Methods inherited from Repo

#clone_to, #clone_url, #cloned?, #fork?

Constructor Details

#initialize(api_data) ⇒ Repo

Returns a new instance of Repo.



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/gitload/sources/github.rb', line 29

def initialize api_data
  super :github, api_data

  @name = api_data['name']
  @owner = api_data['owner']['login']
  @owner_type = api_data['owner']['type']

  @fork = api_data['fork']

  @clone_urls[:git] = api_data['git_url']
  @clone_urls[:ssh] = api_data['ssh_url']
  @clone_urls[:http] = api_data['clone_url']
end