Class: Vcloud::NetLauncher::Cli
- Inherits:
-
Object
- Object
- Vcloud::NetLauncher::Cli
- Defined in:
- lib/vcloud/net_launcher/cli.rb
Instance Method Summary collapse
-
#initialize(argv_array) ⇒ void
constructor
Initiates parsing of the command-line arguments.
-
#run ⇒ void
Runs Vcloud::NetLauncher::NetLaunch#run to create networks defined in @config_file, catching any exceptions to prevent printing a backtrace.
Constructor Details
#initialize(argv_array) ⇒ void
Initiates parsing of the command-line arguments.
11 12 13 14 15 16 |
# File 'lib/vcloud/net_launcher/cli.rb', line 11 def initialize(argv_array) @usage_text = nil @config_file = nil parse(argv_array) end |
Instance Method Details
#run ⇒ void
This method returns an undefined value.
Runs Vcloud::NetLauncher::NetLaunch#run to create networks defined in @config_file, catching any exceptions to prevent printing a backtrace.
22 23 24 25 26 27 28 29 |
# File 'lib/vcloud/net_launcher/cli.rb', line 22 def run begin Vcloud::NetLauncher::NetLaunch.new.run(@config_file) rescue => error_msg $stderr.puts(error_msg) exit 1 end end |