Sha256: e2e6466867b31e1d0d10d6e7f985b1fb170fd4ac56beaa5a6e2e70ccd4a9b62f

Contents?: true

Size: 734 Bytes

Versions: 6

Compression:

Stored size: 734 Bytes

Contents

require_relative 'query_results'
require 'osc_ruby/modules/validations_module'
require 'ostruct'

module OSCRuby

	class QueryResultsSet < OpenStruct

		include ValidationsModule

		def query_set(client,*args)

			ValidationsModule::check_client(client)
			
			query_arr = []
			
			key_map = []

			args.each do |qh|

				key_map.push(qh[:key])

				query_arr.push(qh[:query])	
			
			end

			query_results_set = OpenStruct.new
			query_search = OSCRuby::QueryResults.new
		

			final_query_arr = query_arr.join('; ')
			final_results = query_search.query(client,final_query_arr)

			key_map.each_with_index {|k,i| query_results_set[k] = final_results[i]}
			query_results_set
		end

	end 

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
osc_ruby-1.3.2 lib/osc_ruby/classes/query_results_set.rb
osc_ruby-1.3.1 lib/osc_ruby/classes/query_results_set.rb
osc_ruby-1.2.2 lib/osc_ruby/classes/query_results_set.rb
osc_ruby-1.2.1 lib/osc_ruby/classes/query_results_set.rb
osc_ruby-1.2.0 lib/osc_ruby/classes/query_results_set.rb
osc_ruby-1.1.0 lib/osc_ruby/classes/query_results_set.rb