lib/gooddata/mixins/md_object_query.rb in gooddata-0.6.11 vs lib/gooddata/mixins/md_object_query.rb in gooddata-0.6.12
- old
+ new
@@ -43,13 +43,21 @@
result = c.get(uri)['entries']
if key.nil?
result
elsif key.respond_to?(:category)
- result.select { |item| item['category'] == key.category }
+ result = result.select { |item| item['category'] == key.category }
else
- result.select { |item| item['category'] == key }
+ result = result.select { |item| item['category'] == key }
end
+
+ if opts[:full]
+ result = result.map do |res|
+ GoodData::MdObject[res['link'], :client => c, :project => opts[:project]]
+ end
+ end
+
+ result
end
# Checks for dependency
def dependency?(type, uri, target_uri, opts = { :client => GoodData.connection, :project => GoodData.project })
uri = uri.respond_to?(:uri) ? uri.uri : uri