class Michael::Commands::Auth
Attributes
options[R]
prompt[R]
token[R]
Public Class Methods
new(prompt, token, options)
click to toggle source
# File lib/michael/commands/auth.rb, line 6 def initialize(prompt, token, options) @prompt = prompt @token = token @options = options end
Public Instance Methods
execute()
click to toggle source
# File lib/michael/commands/auth.rb, line 12 def execute tkn = read_token token.validate(tkn) token.store(tkn) puts 'Token saved!' end
Private Instance Methods
read_token()
click to toggle source
# File lib/michael/commands/auth.rb, line 23 def read_token prompt.mask('Please specify github token:', echo: false) do |q| q.modify :strip end end