Method: GoodData::Mixin::MdObjectQuery#using

Defined in:
lib/gooddata/mixins/md_object_query.rb

#using(uri, key = nil, opts = { :client => GoodData.connection, :project => GoodData.project }) ⇒ Object

Returns which objects this MD resource uses



115
116
117
118
119
120
121
122
123
# File 'lib/gooddata/mixins/md_object_query.rb', line 115

def using(uri, key = nil, opts = { :client => GoodData.connection, :project => GoodData.project })
  p = opts[:project]
  fail ArgumentError, ERROR_MESSAGE_NO_PROJECT if p.nil?

  project = GoodData::Project[p, opts]
  fail ArgumentError, ERROR_MESSAGE_NO_PROJECT if project.nil?

  dependency("#{project.md['using2']}/#{uri_obj_id(uri)}", key, opts)
end