Class: GithubAuthentication::Generator::Personal
- Inherits:
-
Object
- Object
- GithubAuthentication::Generator::Personal
- Defined in:
- lib/github_authentication/generator/personal.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(github_token:) ⇒ Personal
constructor
A new instance of Personal.
Constructor Details
#initialize(github_token:) ⇒ Personal
Returns a new instance of Personal.
8 9 10 |
# File 'lib/github_authentication/generator/personal.rb', line 8 def initialize(github_token:) @github_token = github_token end |
Instance Method Details
#generate ⇒ Object
12 13 14 15 |
# File 'lib/github_authentication/generator/personal.rb', line 12 def generate a_year_from_now = Time.now.utc + 31_556_952 Token.new(@github_token, a_year_from_now) end |