Class: Neetob::CLI::Github::Base

Inherits:
Base
  • Object
show all
Includes:
Utils
Defined in:
lib/neetob/cli/github/base.rb

Constant Summary

Constants inherited from Base

Base::NEETO_APPS_LIST_LINK

Instance Attribute Summary collapse

Attributes inherited from Base

#ui

Instance Method Summary collapse

Methods included from Utils

#camel_case_to_slug, #is_upper?, #symbolize_keys

Constructor Details

#initializeBase

Returns a new instance of Base.



17
18
19
20
21
22
23
24
# File 'lib/neetob/cli/github/base.rb', line 17

def initialize
  super()
  auth_client = Auth.new(**read_and_parse_auth_params_from_env)
  unless auth_client.token_persisted?
    auth_client.start_oauth2_device_flow
  end
  @client = Octokit::Client.new(access_token: auth_client.access_token)
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



15
16
17
# File 'lib/neetob/cli/github/base.rb', line 15

def client
  @client
end