Class: Neetob::CLI::Github::Base
- Includes:
- Utils
- Defined in:
- lib/neetob/cli/github/base.rb
Direct Known Subclasses
Code::Audit, Issues::Create, Issues::List, Labels::Delete, Labels::DeleteAll, Labels::List, Labels::Show, Labels::Update, Labels::Upsert, Login, MakePr::Base, ProtectBranch, Users::Commits
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ Base
constructor
A new instance of Base.
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize ⇒ Base
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
#client ⇒ Object
Returns the value of attribute client.
15 16 17 |
# File 'lib/neetob/cli/github/base.rb', line 15 def client @client end |