Class: Xambassador::Connection
- Inherits:
-
Object
- Object
- Xambassador::Connection
- Defined in:
- lib/xambassador/connection.rb
Overview
Connection helpers
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize ⇒ Connection
constructor
A new instance of Connection.
- #token ⇒ Object
Constructor Details
#initialize ⇒ Connection
Returns a new instance of Connection.
8 9 10 |
# File 'lib/xambassador/connection.rb', line 8 def initialize @client ||= Octokit::Client.new(access_token: token) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/xambassador/connection.rb', line 6 def client @client end |
Instance Method Details
#token ⇒ Object
12 13 14 |
# File 'lib/xambassador/connection.rb', line 12 def token ENV["GITHUB_AUTH_TOKEN"] end |