Class: GithubAuthentication::Generator::Personal

Inherits:
Object
  • Object
show all
Defined in:
lib/github_authentication/generator/personal.rb

Instance Method Summary collapse

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

#generateObject



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