Sha256: ef290c4884082b58d7f27f1cf5940dcd596713b95789cb2ea6d6d022e555e86f
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 KB
Contents
# encoding: UTF-8 module GoodData module Mixin module MdRelations def dependency(uri, key = nil, opts = { :client => client, :project => project }) GoodData::MdObject.dependency(uri, key, opts) end # Checks for dependency def dependency?(type, obj, opts = { :client => client, :project => project }) GoodData::MdObject.dependency?(type, self, obj, opts) end # Returns which objects uses this MD resource def usedby(key = nil, opts = { :client => client, :project => project }) dependency("#{project.md['usedby2']}/#{obj_id}", key, opts) end alias_method :used_by, :usedby # Returns which objects this MD resource uses def using(key = nil, opts = { :client => client, :project => project }) dependency("#{project.md['using2']}/#{obj_id}", key, opts) end def usedby?(obj, opts = { :client => client, :project => project }) GoodData::MdObject.used_by?(self, obj, opts) end alias_method :used_by?, :usedby? # Checks if obj is using this MD resource def using?(obj, opts = { :client => client, :project => project }) dependency?(:using, obj, opts) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gooddata-0.6.11 | lib/gooddata/mixins/md_relations.rb |