Class: Armrest::CLI::Auth

Inherits:
Object
  • Object
show all
Defined in:
lib/armrest/cli/auth.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Auth

Returns a new instance of Auth.



3
4
5
# File 'lib/armrest/cli/auth.rb', line 3

def initialize(options={})
  @options = options
end

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
# File 'lib/armrest/cli/auth.rb', line 7

def run
  provider = Armrest::Auth.new(@options).provider
  if provider
    puts JSON.pretty_generate(provider.creds)
  else
    puts "Unable to authenticate"
  end
end