Class: Vcloud::Core::LoginCli
- Inherits:
-
Object
- Object
- Vcloud::Core::LoginCli
- Defined in:
- lib/vcloud/core/login_cli.rb
Instance Method Summary collapse
-
#initialize(argv_array) ⇒ LoginCli
constructor
A new instance of LoginCli.
- #run ⇒ Object
Constructor Details
#initialize(argv_array) ⇒ LoginCli
Returns a new instance of LoginCli.
7 8 9 10 11 |
# File 'lib/vcloud/core/login_cli.rb', line 7 def initialize(argv_array) @usage_text = nil parse(argv_array) end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/vcloud/core/login_cli.rb', line 13 def run begin pass = read_pass puts Vcloud::Core::Fog::Login.token_export(pass) rescue => e $stderr.puts(e) exit 1 end end |