Class: Vcloud::Core::LogoutCli
- Inherits:
-
Object
- Object
- Vcloud::Core::LogoutCli
- Defined in:
- lib/vcloud/core/logout_cli.rb
Instance Method Summary collapse
-
#initialize(argv_array) ⇒ Vcloud::Core::LogoutCLI
constructor
Create a new instance of the CLI, parsing the arguments supplied.
-
#run ⇒ void
Logout an existing vCloud session.
Constructor Details
#initialize(argv_array) ⇒ Vcloud::Core::LogoutCLI
Create a new instance of the CLI, parsing the arguments supplied
11 12 13 14 15 |
# File 'lib/vcloud/core/logout_cli.rb', line 11 def initialize(argv_array) @usage_text = nil parse(argv_array) end |
Instance Method Details
#run ⇒ void
This method returns an undefined value.
Logout an existing vCloud session.
20 21 22 23 24 25 26 27 |
# File 'lib/vcloud/core/logout_cli.rb', line 20 def run begin Vcloud::Core::Fog.logout rescue => e $stderr.puts("#{e.class}: #{e.message}") exit 1 end end |