Class: Vcloud::Core::Query
- Inherits:
-
Object
- Object
- Vcloud::Core::Query
- Defined in:
- lib/vcloud/core/query.rb
Instance Method Summary collapse
-
#get_all_results ⇒ Object
DEPRECATED: Please use
Vcloud::Core::QueryRunner.runinstead. -
#initialize(type = nil, options = {}, query_runner = Vcloud::Core::QueryRunner.new) ⇒ Query
constructor
A new instance of Query.
- #run ⇒ Object
Constructor Details
#initialize(type = nil, options = {}, query_runner = Vcloud::Core::QueryRunner.new) ⇒ Query
Returns a new instance of Query.
7 8 9 10 11 12 |
# File 'lib/vcloud/core/query.rb', line 7 def initialize(type=nil, ={}, query_runner = Vcloud::Core::QueryRunner.new) @type = type @options = @options[:output_format] ||= 'tsv' @query_runner = query_runner end |
Instance Method Details
#get_all_results ⇒ Object
DEPRECATED: Please use Vcloud::Core::QueryRunner.run instead.
23 24 25 26 |
# File 'lib/vcloud/core/query.rb', line 23 def get_all_results warn "[DEPRECATION] `Vcloud::Core::Query::get_all_results` is deprecated. Please use `Vcloud::Core::QueryRunner.run` instead." @query_runner.run(@type, @options) end |
#run ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/vcloud/core/query.rb', line 14 def run() if @type.nil? output_available_query_types else output_query_results end end |