Class: Vcloud::Core::QueryCli
- Inherits:
-
Object
- Object
- Vcloud::Core::QueryCli
- Defined in:
- lib/vcloud/core/query_cli.rb
Instance Method Summary collapse
-
#initialize(argv_array) ⇒ Vcloud::Core::QueryCLI
constructor
Create a new instance of the CLI, parsing the arguments supplied.
-
#run ⇒ void
Run a query and print results to standard out.
Constructor Details
#initialize(argv_array) ⇒ Vcloud::Core::QueryCLI
Create a new instance of the CLI, parsing the arguments supplied
11 12 13 14 15 16 17 |
# File 'lib/vcloud/core/query_cli.rb', line 11 def initialize(argv_array) @usage_text = nil @type = nil = {} parse(argv_array) end |
Instance Method Details
#run ⇒ void
This method returns an undefined value.
Run a query and print results to standard out
22 23 24 25 26 27 28 29 |
# File 'lib/vcloud/core/query_cli.rb', line 22 def run begin Vcloud::Core::Query.new(@type, ).run rescue => e $stderr.puts(e) exit 1 end end |