Class: GoodGuide::Gibbon::StaticClient
Instance Method Summary
collapse
Methods included from Util
#hash_to_js, #hash_to_ruby, #obj_to_ruby
queries, query
Instance Method Details
#analyze_query(input_id, query, t) ⇒ Object
202
203
204
205
206
207
|
# File 'lib/goodguide/gibbon.rb', line 202
def analyze_query(input_id, query, t)
query_impl = get_query(query.type)
analysis = instance_exec(input_id, query.name, t, &query_impl)
analysis[:annotations]['_query_type'] = query.type
analysis
end
|
#query_error!(*a) ⇒ Object
198
199
200
|
# File 'lib/goodguide/gibbon.rb', line 198
def query_error!(*a)
raise QueryError.new(*a)
end
|
#to_js ⇒ Object
209
210
211
|
# File 'lib/goodguide/gibbon.rb', line 209
def to_js
{ :analyzeQuery => proc_for(:analyze_query) }
end
|