Class: ZenhubRuby::Github

Inherits:
Object
  • Object
show all
Defined in:
lib/zenhub_ruby/github.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_token) ⇒ Github

Returns a new instance of Github.



7
8
9
# File 'lib/zenhub_ruby/github.rb', line 7

def initialize(access_token)
  @auth = Octokit::Client.new(access_token: access_token)
end

Instance Attribute Details

#authObject (readonly)

Returns the value of attribute auth.



5
6
7
# File 'lib/zenhub_ruby/github.rb', line 5

def auth
  @auth
end

Instance Method Details

#repo_id(repo_name) ⇒ Object



11
12
13
# File 'lib/zenhub_ruby/github.rb', line 11

def repo_id(repo_name)
  auth.repo(repo_name).id
end