Method: GoodData::Project#labels

Defined in:
lib/gooddata/models/project.rb

#labels(id = :all, opts = {}) ⇒ GoodData::Fact | Array<GoodData::Fact>

Helper for getting labels of a project

GoodData::Label[id] + it supports :all as welll

Parameters:

  • Anything (String | Number | Object)

    that you can pass to

Returns:



1337
1338
1339
1340
1341
1342
1343
# File 'lib/gooddata/models/project.rb', line 1337

def labels(id = :all, opts = {})
  if id == :all
    attributes.pmapcat(&:labels).uniq
  else
    GoodData::Label[id, opts.merge(project: self, client: client)]
  end
end