Class: GitHub

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/mygit.rb

Instance Method Summary collapse

Constructor Details

#initialize(u, p) ⇒ GitHub

Returns a new instance of GitHub.



8
9
10
# File 'lib/mygit.rb', line 8

def initialize(u, p)
  @auth = {:username => u, :password => p}
end

Instance Method Details

#repos(repo) ⇒ Object



12
13
14
# File 'lib/mygit.rb', line 12

def repos repo
  self.class.get("/orgs/#{repo}/repos?per_page=100", {:basic_auth => @auth})
end