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
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, = {}) id = id.respond_to?(:id) ? id.id : id dss = ProjectBlueprint.datasets(self, ).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 |