lib/semantics3.rb in semantics3-0.11 vs lib/semantics3.rb in semantics3-0.12
- old
+ new
@@ -96,11 +96,11 @@
def get_products
run_query("products")
end
def all_products
- if not @query_result.has_key?(results)
+ if not @query_result.has_key?('results')
raise Error.new('Undefined Query','Query result is undefined. You need to run a query first.')
end
@query_result['results']
end
@@ -276,6 +276,6 @@
JSON.parse(foo).all?
rescue JSON::ParserError
false
end
end
-end
+end
\ No newline at end of file