Class: KExt::Github::GitHubConfiguration
- Inherits:
-
Object
- Object
- KExt::Github::GitHubConfiguration
- Includes:
- KLog::Logging, KUtil::Data::InstanceVariablesToH
- Defined in:
- lib/k_ext/github/github_configuration.rb
Overview
GitHub Configuration
Instance Attribute Summary collapse
-
#personal_access_token ⇒ Object
Returns the value of attribute personal_access_token.
-
#personal_access_token_delete ⇒ Object
Returns the value of attribute personal_access_token_delete.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
- #debug ⇒ Object
-
#initialize ⇒ GitHubConfiguration
constructor
A new instance of GitHubConfiguration.
Constructor Details
#initialize ⇒ GitHubConfiguration
Returns a new instance of GitHubConfiguration.
26 27 28 29 30 |
# File 'lib/k_ext/github/github_configuration.rb', line 26 def initialize @user = ENV.fetch('GH_USER') { ENV.fetch('GITHUB_USER', nil) } @personal_access_token = ENV.fetch('GITHUB_PERSONAL_ACCESS_TOKEN', nil) @personal_access_token_delete = ENV.fetch('GITHUB_PERSONAL_ACCESS_TOKEN_DELETE', nil) end |
Instance Attribute Details
#personal_access_token ⇒ Object
Returns the value of attribute personal_access_token.
23 24 25 |
# File 'lib/k_ext/github/github_configuration.rb', line 23 def personal_access_token @personal_access_token end |
#personal_access_token_delete ⇒ Object
Returns the value of attribute personal_access_token_delete.
24 25 26 |
# File 'lib/k_ext/github/github_configuration.rb', line 24 def personal_access_token_delete @personal_access_token_delete end |
#user ⇒ Object
Returns the value of attribute user.
22 23 24 |
# File 'lib/k_ext/github/github_configuration.rb', line 22 def user @user end |
Instance Method Details
#debug ⇒ Object
32 33 34 35 36 37 |
# File 'lib/k_ext/github/github_configuration.rb', line 32 def debug log.section_heading 'GitHub Configuration' log.kv 'user', user log.kv 'personal_access_token', '***' log.kv 'personal_access_token_delete', '***' end |