Class: OSCRuby::QueryResultsSet
- Inherits:
-
Object
- Object
- OSCRuby::QueryResultsSet
- Includes:
- ValidationsModule
- Defined in:
- lib/osc_ruby/classes/query_results_set.rb
Instance Method Summary collapse
Methods included from ValidationsModule
attr_hash_exists_and_is_type_of, check_attributes, check_attributes_request, check_client, check_for_id, check_for_names, check_for_parents, check_interfaces, check_obj_for_errors, check_object_for_id, check_query, extract_attributes
Instance Method Details
#query_set(client, *args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/osc_ruby/classes/query_results_set.rb', line 10 def query_set(client,*args) ValidationsModule::check_client(client) query_arr = [] key_map = [] args.each do |qh| key_map.push(qh[:key].to_sym) query_arr.push(qh[:query]) end query_results_set = Struct.new( *key_map ) query_search = OSCRuby::QueryResults.new final_query_arr = query_arr.join('; ') final_results = query_search.query(client,final_query_arr) final_query_results_set = query_results_set.new( *final_results ) final_query_results_set end |