Class: WhatIsItAbout::Github

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGithub

Returns a new instance of Github.



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/what_is_it_about/github.rb', line 11

def initialize
  token = WhatIsItAbout.config['github']['token'] if WhatIsItAbout.config['github']
  unless token
    $stderr.puts <<-MESSAGE
Set GITHUB TOKEN https://github.com/settings/tokens in ~/.what_is_it_about

github:
  token: <YOU GITHUB TOKEN>
    MESSAGE
    exit(1)
  end
  @client = Octokit::Client.new(access_token: token)
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



9
10
11
# File 'lib/what_is_it_about/github.rb', line 9

def client
  @client
end