Method: GoodData::Model::ProjectBlueprint#datasets

Defined in:
lib/gooddata/models/blueprint/project_blueprint.rb

#datasets(id = :all, options = {}) ⇒ Array<GoodData::Model::DatasetBlueprint>

Returns datasets of blueprint. Those can be optionally including date dimensions

Parameters:

  • options (Hash) (defaults to: {})

    options

Options Hash (options):

  • :include_date_dimensions (Boolean)

    Specifies whether to include date dimensions

  • :dd (Boolean)

    Specifies whether to include date dimensions

Returns:



206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/gooddata/models/blueprint/project_blueprint.rb', line 206

def datasets(id = :all, options = {})
  id = id.respond_to?(:id) ? id.id : id
  dss = ProjectBlueprint.datasets(self, options).map do |d|
    case d[:type]
    when :date_dimension
      DateDimension.new(d, self)
    when :dataset
      DatasetBlueprint.new(d, self)
    end
  end
  id == :all ? dss : dss.find { |d| d.id == id }
end