Class: Michael::Commands::Auth

Inherits:
Object
  • Object
show all
Defined in:
lib/michael/commands/auth.rb

Instance Method Summary collapse

Constructor Details

#initialize(prompt, token, options) ⇒ Auth

Returns a new instance of Auth.



6
7
8
9
10
# File 'lib/michael/commands/auth.rb', line 6

def initialize(prompt, token, options)
  @prompt = prompt
  @token = token
  @options = options
end

Instance Method Details

#executeObject



12
13
14
15
16
17
# File 'lib/michael/commands/auth.rb', line 12

def execute
  tkn = read_token
  token.validate(tkn)
  token.store(tkn)
  puts 'Token saved!'
end